In my XML for a List object I have made use of a formatter:
{path: 'Erdat', formatter: '.formatter.dateFormatter'}
This works as expected and I can see the bound value for Erdat
passed into dateFormatter
and then formatted appropriately. However, on my app I have an option to re-call the back-end gateway service, which will re-bind the newly fetched data to the List (listLogs
):
oActLogs.read("/ActivityLogsSet", {
success: function (oData, oResponse){
oActivityLogsModel.setData(oData);
listLogs.setModel(oActivityLogsModel);
oGlobalBusyDialog.close();
},
// ...
});
This works and I can see the new data being fetched from the service. However, when I set this new model to listLogs
the formatter is hit but this time it is being passed null
, and then crashes when the formatter tries to do anything with this value.
I have debugged and seen that on this second call the data fetched is not null, so why is null being passed to the formatter?