I am trying to display data that is being return by an API. On my system.debug I can see the data is there but on displaying on the page it only shows an array of the ids of the list object. This is the code to show it.
display.page
<apex:datatable value="{!dataArray}" var="data" styleclass="data-tbl" columnswidth="44%, 40%, 16%" headerclass="tbl--cell-header" rowclasses="odd,even">
<apex:column >
<apex:outputtext value="{!data}" />
</apex:column>
<apex:column >
<apex:outputtext value="{!data.name}" />
</apex:column>
<apex:column >
<apex:outputtext value="{!data.title} : {!data.company}" />
</apex:column>
</apex:datatable>
Apex
public List<Data_Mapping__c> dataarray;
public List<Data_Mapping__c> getdataarray() {
// API call to get data
dataArray = datafunctions.getData();
// Shows actual data including id, name, title, column
system.debug('@@@dataArray ' + dataarray);
return dataarray;
}
When I use system.debug('@@@dataArray ' + dataarray); it shows the output I want to use on page for example something like "{Data_Mapping__c: {Id: 123456abc, name: test, title: test-title, company: test-company}}" is on the user_debug log.
When I display dataArray on page it just shows [123456abd].