Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5: How to make an asynchronous OData .create() request?

$
0
0

Hi,

 

In my sapui5 app, I have an animation made by progress indicator which is running while waiting for the response of an OData model .create() service. However, the animation stops after the request is sent.

 

Does anyone know how to make an async .create() OData request?

 

Thanks a lot!

 

My code look like this:

 

 

oODModel = new sap.ui.model.odata.ODataModel(myUrl);

oEntry = myNewDataEntry;

 

myAnimationIndicator.start();    //animation starts to run

 

var onSuccess = function(){myAnimationIndicator.stop();};

var onError = function(){myAnimationIndicator.stop();};

 

oODModel.create('myDataSet',oEntry, null, onSuccess, onError);


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>