Hi All,
I have created a custom UI5 app. In View1, I have used sap.m.table for user input. The table is initially blank, where user can add/ delete rows. After saving the data of the table, I am navigating to View2. But when I come back to View1, the data entered by the user is still there, and not getting refreshed. I have tried the following syntax, but it doesn’t help. I'm saving, adding, deleting, and changing data on the back end, but the UI screen doesn't seem to be cleared/ refreshed. Please advise.

onInit: function () {
this.oScopeTable = this.getView().byId("idtable_newDeal");
var TableModel = new sap.ui.model.json.JSONModel([]);
this.getView().setModel(TableModel, "tableModel");
this.onAddRow();
}
onAddRow: function (oEvent) {
var tableModel = this.getView().getModel("tableModel");
tableModel.getData().push({});
tableModel.refresh();
},
onRefresh: function () {
// this.getView().getModel("tableModel").setData({
// tableModel: {}
// });
// this.getView().getModel("tableModel").refresh(true);
// this.oScopeTable.getModel().refresh(true) ;
// this.oScopeTable.getBinding("rows").refresh();
// this.oScopeTable.getBinding("items").refresh();
}