I am working on a master/detail SAPUI5 example with ODataModel. Every selection at the master list is updating the binding path per ID to the details view. The user of my app should be able to alter the information appearing at the details page (aka change the model) per master list selection.
I wanted to have an alert when the user will switch from Master List item A to item B and the details of the Item A have been altered.
As such , I was planning using the "hasPendingChanges" method. While calling
this.getView().getBindingContext().getModel()
I realized that this method returns the same model. Having a JAVA background I was expecting to get the model of the current detail view. (the model! not the object...)
I would like to know if there is a way to check per master list selection if the current Details model has been changed.
I have found this question but in that case this guy is looking for the object , while in my case I am looking for the model so I can return the hasPendingChanges().