I am looking for an event to be selected if ODataModel is changed (client side). The problem is that in my application there are many different fields that can edit the model. In the case of a model change, I will have a function registered that activates the "Save" button. The Save button calls the submitChanges () function of the model (I use TwoWayBinding mode).
Currently, I have only discovered the hasPendingChanges () method, but could not register the event.
What is the proposed solution to solve this problem?
For processing changes in each control, the Input does not look like this because it is easy to forget some fields (at least if someone else will support the code).
My current solutions look something like this:
sap.ui.model.odata.ODataModel.extend("MyModel", { setProperty : function(sPath, oValue, oContext) { sap.ui.model.odata.ODataModel.prototype.setProperty.apply(this, [sPath, oValue, oContext]);
source share