question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: sap.ui.model.odata.v2.ODataModel done callback

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bkrrrrcommented, Nov 2, 2017

Yes, i`m aware of this event.

Nevertheless, a simple “done” would be cleaner. Also, for deferred request; the execution order is not guaranteed.

0reactions
eckercommented, Aug 24, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found