Feature request: sap.ui.model.odata.v2.ODataModel done callback
See original GitHub issueHi,
it would be really handy to have a third callback for backend requests, “done()” should be called always:
oModel.remove(sPath, {
done: function() {
oView.setBusy(false);
}
});
oModel.remove(sPath, {
success: function() {
oView.setBusy(false);
},
error: function() {
oView.setBusy(false);
}
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
sap.ui.model.odata.v2.ODataModel - API Reference - Demo Kit
In case no callback function is provided, the request will not be triggered. If a callback function is given, the created binding context...
Read more >OData V2 Model - SAP Help Portal
The OData model is a server-side model, meaning that the data set is only available on the server and the client only knows...
Read more >SAPUI5 odata.v2.ODataModel Call back of batch request is ...
submitChanges({ // deffered group id groupId: "deletionGroup", success: function(oData) { sap.m.MessageToast.show(oData.toString()); var ...
Read more >December 2019 - Roland Bouman's blog
Or rather, how our sap.ui.model.odata.v2.ODataModel wants us to pass the data so it can do the appropriate call to the backend. In a...
Read more >sap.ui.model.odata.v2.ODataModel - OPENUI5 SDK
requestCompleted(oControlEvent)The 'requestCompleted' event is fired, after a request has been completed (includes receiving a response), no matter whether the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, i`m aware of this event.
Nevertheless, a simple “done” would be cleaner. Also, for deferred request; the execution order is not guaranteed.
@bkrrr, in the meantime and since UI5 1.65, hasPendingChanges() of sap.ui.model.odata.v2.ODataModel can now also take into account deferred requests triggered through create, update, and remove. Please see https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel/methods/hasPendingChanges . BTW, resetChanges() has been enhanced in a similar way.
Given those enhancements, your original request might be addressable by the new capabilities or you might have found an alternative way since then? We have no add’tl plans to change or enhance functionality mentioned. As such, we’re going to close this issue. If you think there is still an issue, feel free to report.