Skip to Content

How to use busy indicator in Fiori custom application

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2015 at 01:09 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2015 at 03:50 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2015 at 10:03 AM

    Hi Ansuman,

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

    Regards,
    Naren L Naik

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.