cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent automatic update of my model?

duncanbarre
Participant

I have a sap.ui.table which is binded to a model/entityset. The table is made editable by making the input fields inside the columns editable. When the user changes the data in the table it triggers update_entityset automatically. I dont want that. I would like to edit the table and then press the button Save which then triggers sumbitChanges -> update_entityset. So how do I prevent automatic update?

View Entire Topic
vneecious
Advisor
Advisor

The group where your changes are being sent is not set as deferred.

this.getModel("yourModel").setDeferredGroups(["changes", "yourgroupid"])
<br>

From the API Documentation:

Setting request groups as deferred.
Requests that belong to a deferred group will be sent by explicitly calling #submitChanges.

duncanbarre
Participant
0 Kudos

Yes this is it! Thank you. I've put your code inside the success of submitChanges()