SAPUI5: How to get an event notification in case of ODataModel changes?
You can use sap.ui.model.Binding.attachChange()
var binding = new sap.ui.model.Binding(model, "/", model.getContext("/"));
binding.attachChange(function() {
saveButton.setVisible(true);
saveButton.setEnabled(true);
//or anything else
});
The function is called every time the model changes, eg. by calling model.setProperty(key, value)
.
https://openui5.netweaver.ondemand.com/#docs/api/symbols/sap.ui.model.Binding.html