Showing results for 
Search instead for 
Did you mean: 


Former Member
0 Kudos

Hi All,

Is there an example on how to compare two models for differences?

I am creating a cancel button and wanted to detect if the oModel (JSON) has changed and accordingly prompt the user to either save or discard changes.

I have read in the documentation that there is an updateRequired() method for the model.Binding.

new sap.ui.model.Binding(the, sPath, oContext, mParameters?)

updateRequired(oModel) : boolean

Determines if the binding should be updated by comparing the current model against a specified model.

I am trying to use this method but it is not working... any help on alternative ways? The documentation is not so elaborate.

Thanks in advance,


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Imran,

I don't know why you can't access to this method... we need the code for look that, otherwise you can implement the method by yourself, this is the code:

function(m){return m&&this.getModel()===m} //this is your control


José Manuel