10-01-2016 5:22 PM
Hi Experts,
I am Facing issue over refreshing a table. ActuallyI had binded table with a json model, and the table is editable.I am input some data in to the cells.and now i want to refresh the table to it's previous position. I just used refresh button and used an event the code as follows
oRef:function(oEvent){
//var otab=that.getView().byId("oTable1");
//this.getView().byId("oTable1").setNoData();
//this.getView().byId("oTable1").getModel().refresh(true);
//this.getView().byId("oTable1").setModel(oModel);
}
please help me.....
10-02-2016 9:51 AM
10-02-2016 9:51 AM
10-03-2016 8:25 AM
Hello,
since, refresh is not working, you can set backend data to model again, as below:
while reading the data from service take two copy of that data.
oBackendData = oData; //oData is coming from service response
oTableData = oData;
set oTableData to oModel
set oModel to table
and in oRef function right below:
set oBackendData to oModel
set oModel to table again
now your table will be refreshed.
Note: you can read data again inside oRef function also, but two copy of data will avoid backend trigger
hope this will help you.
Regards,
Akhilesh
10-03-2016 7:17 PM
Hi Akhilesh,
Actually I am using a locall model it's not coming from any service.
Regards,
Mutyam.
10-04-2016 7:53 AM
10-04-2016 2:36 PM