在我的 SAPUI5 应用程序中,我有一个由进度指示器制作的动画,它应该在等待 OData 模型.create()
服务的响应时运行(因为需要一段时间才能将响应返回到 UI)。
问题是动画在.create()
请求发送后停止。
有谁知道如何发出异步.create()
OData 请求?
我的代码如下所示:
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); //From here the animation stops