on 02-26-2014 2:35 PM
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,
Ron
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
Regards,
José Manuel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.