CSV File contains headers. Full Name - is first column header, Manager Email - last column header.
after file input, i create map that contains rowIndex (for VF apex:repeat), 'Header'='Value' (Map)
If I try to display Full Name (first header) or Manager Email (last header) on VF-page:
Map key Full Name not found in map
Error is in expression '{!values[n]['Full Name']}' in component in page ruit_ios_app
But if i delete this expression from page, it works.
APEX CONTROLLER
public void importCSVFile() {
try {
csvAsString = csvFileBody.toString();
csvFileLines = csvAsString.split('\n');
List<String> headers = csvFileLines[0].split(';');
for (Integer i = 1; i < csvFileLines.size(); i++) {
List<String> csvRecordData = csvFileLines[i].split(';');
Map<String, String> newMap = new Map<String, String>();
for (Integer j = 0; j < headers.size(); j++) {
newMap.put(headers[j], csvRecordData[j]);
}
numbers.add(i);
values.put(i, newMap);
}
PAGE
<apex:repeat value="{!numbers}" var="n">
<tr>
<td>{!values[n]['Full Name']}</td>
<td>{!values[n]['Email']}</td>
<td>{!values[n]['Last Check In']}</td>
<td>{!values[n]['OS Version']}</td>
<td>{!values[n]['Device Model']}</td>
<td>{!values[n]['Country']}</td>
<!--<td>{!values[n]['Manager Email']}</td>-->
</tr>
</apex:repeat>