cancel
Showing results for 
Search instead for 
Did you mean: 

How to use busy indicator in Fiori custom application

AP85
Explorer
0 Kudos

Hello Experts!!

We have made a custom Fiori master detail application. We want to show a busy indicator while navigating from one view to another. we have tried this on click of a button but it is not working properly.

I am copying the code for reference.

Please advise on this.

First view

onPress: function(){

  var a = this.getView().byId("busyDialog");

  a.open();

  

  var bReplace = jQuery.device.is.phone ? false : true;

  var sid = sysid;

  if(sap.ui.getCore().byId("idSystemDetailMonthly--idoSelect1")){

  var a=sap.ui.getCore().byId("idSystemDetailMonthly--idoSelect1");

  a.setSelectedItem("2015");

  a.setValue("2015");

  a.setSelectedKey("2015");

  };

  if(sap.ui.getCore().byId("idSystemDetailMonthly--idoTable")){

     var a = sap.ui.getCore().byId("idSystemDetailMonthly--idoTable");

     

    a.destroyColumns();

      };

   

  sap.ui.core.UIComponent.getRouterFor(this).navTo("sa_month", {

  sid: sid,

  }, bReplace);

}

second view

  var oModel = new sap.ui.model.json.JSONModel();

  var oModel1 = new sap.ui.model.json.JSONModel();

  var oVizFrame5 = this.getView().byId("idoVizFrame5");

  var url = '/sap/opu/odata/sap/ZOCC_ODATA_SRV/';

      var omdl = new sap.ui.model.odata.ODataModel(url,true);

   omdl.read("/MonthlyDetailsSet?$filter=Id eq " +"'"+zid+"'"+" and Sid eq" +"'"+zsid+"'"+" and Year eq " +"'"+zyear+"'"+"", null, null, false, function(oData, oResponse){

   if(oData){

   oModel.setData(oData);

  jQuery.sap.delayedCall(1000, this, function () {

   a.close();

  });

   };});

Thanks

Ansuman

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ansuman,

In the second view, is the variable 'a' defined?

Regards,
Naren L Naik

RameshShrestha
Contributor
0 Kudos

Hi Ansuman,

Your dialog is part of your first view so while navigating to next view surely it will be destroyed.

So

Try by Keep the busy dialog  in component.js itself.Then show busy indicator on press of button, while destroy same on after rendering function of the second view.

vdurgarao09
Contributor
0 Kudos

Hi Ansuman,

Check the help link

BR,

Durga Rao,