Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3273

Re: Setbusy not executing...

$
0
0

Hi Adam,

 

If you want to release the busy state after the backend read was successful then use code as below.

The oModel.read calls are asynchronous and you need to set the busy indicator false in the success handler of this function.

 

_onRouteMatched: function (oEvent) {

   //initialise display

   var view = this.getView();

   view.setBusy(true);

 

 

   view.byId("shopInput").setValue("");

   view.byId("effectiveDateFrom").setValue("");

   view.byId("shop24Hrs").setSelected(false);

   view.byId("shopClosed").setSelected(false);

   view.byId("createNext").setVisible(false);

   view.byId("createSubmit").setVisible(false);

   //view.byId("createSave").setVisible(false);

 

 

  // initialise the store view model

   var oModel = this.getModel("site");

 

 

   this.getModel().read("/SiteSet", {

   success: function (oData) {

   var oSiteData = oModel.getData();

   oSiteData.Sites = oData.results;

   oModel.setData(oSiteData);

 

   view.setBusy(false);

 

   }.bind(this)

 

  });  

 

 

},

 

BR.


Viewing all articles
Browse latest Browse all 3273

Trending Articles



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