Skip to Content
avatar image
Former Member

How to place a loading gif before the load of a view?

Hi experts,

I am trying to place a loading gif before the load of a view, similar to fiori custom launch pad.

pastedImage_0.png (10.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Oct 23, 2015 at 07:46 AM

    Why don't you just put it into your .html file?

    Then, after the app is up, remove it or replace by the view.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 09:27 AM

    Hi Sanjo,

    If you're using a JS view, try like this on your createContent() method (below example shown using busy dialog control) -

    var oGlobalBusyDialog = new sap.m.BusyDailog({title:"Processing..."});     //Create a Global BusyDialog
    this.addEventDelegate({
         onBeforeShow:function(){
              oGlobalBusyDialog.open();        //Opens the busy dialog on before show of view
    }
         onAfterShow:function(){
              oGlobalBusyDialog.close();          //Closes the busy dialog on after show of view
    }
    },this);
    

    If you're using XML view, same logic you can have it in onInit of controller. But instead of this, it will be this.getView();


    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 07:22 AM

    Hi,

    Check this link and try implementing the same,

    SAPUI5 app loading indicator - easy way | SCN

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 07:36 AM

    Hi Sanjo,


    Go through this blog, you will get an answer to your question: Asynchronous load of SAPUI5

    Regards,

    Sai Vellanki.

    Add comment
    10|10000 characters needed characters exceeded