Hi,
Don't know if this is the "most (SAPUI5-)idimatic way" to do it, but it's a way (there are other options)
onInit: function() { var oModel = new JSONModel("the path to data"); //Just to get the context this.getView().setModel(oModel); oModel.attachRequestCompleted(function(oEvent) { var oActiveModel = oEvent.getSource(); if (!jQuery.isEmptyObject(oModel.getData())) { // <HERE> } }); },
You need to do processing in the success call back function of the OData Model's read function call.
Add comment