Delay or make callback when binding data in UI5

5.4k Views Asked by At

i want to show message after binding data but message always shown before binding complete and show the result on the bound table. I want to delay or make callback when binding data is finished. Thanks for help.

var oModel = new sap.ui.model.odata.ODataModel("sap/opu/odata/sap/*SRV/");
var oSummaryTable = sap.ui.getCore().byId("oSummaryTable");
oSummaryTable.setModel(oModel);
sap.ui.commons.MessageBox.alert("Succeed");
1

There are 1 best solutions below

2
On
oModel.attachRequestCompleted(function() {
    sap.ui.commons.MessageBox.alert("Succeed");
});