cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Busy Indicator While loading SAPUI5 Application

Former Member
0 Likes
5,044

Hi All,

I have developed an SAPUI5 application. When i run the application it is taking more time to load.

i want to show a busy indicator during the loading process.

i cannot use a Sapui5 control as it is still not loaded ; can u please help me with some other option .

Thanks

Poornima.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Hi Poornima

I am facing the same problem. Have you found any solution?

Regards

Parth

DK007
Active Participant
0 Likes

Hi,

This might help you. I recently implemented it in application and it works.

Thanks,

Dheeram

Former Member
0 Likes

Hi Dheeram,

Thanks a lot for your help. I tried this and it is working fine when the application is running directly. However I have placed my custom UI5 application into Fiori launchpad, as soon as I click on the tile, the busy indicator does not come into play. The screen turns white that looks odd as per the user perspective (image attached below) Kindly suggest how to go with this.

Regards

Parth

tharu
Contributor
0 Likes

Dear Poornima,

In your method set below parameter untill Data loads.

<form name or layout name>.setBusy(true);

when Data loading completed;

<form name or layout name>.setBusy(false);

Former Member
0 Likes

    Dear Tharaka,

                    Thanks for your reply.

    I want to show a busy indicator before my index.html gets loaded.

Thanks,

Poornima.

tharu
Contributor
0 Likes

Dear Poornima,

As per your reply I guess you load all your data before  Index.html loaded.

If that is true set the "setBusy(true);" code according to your code.


OR

In the "onInIt()" Function of your program just write the Coding I have mentioned.

( onInIt() Function is the function that is called by the program automatically when initial page is loaded )


if you are not sure just show the code of your program..I'll help you out

Former Member
0 Likes

Hi Fernando,

I want to apply the busy indicator in a select dialog, where I am loading data in a customList. I want to show the busy indicator before the list gets populated and disable it after the data renders.

Please suggest how I can do that.

Thanks in Advance!

Regards,

Anupriya

padma_mundru
Participant
0 Likes

hi Poornima,

I think you need to place the busyIndicator in the first line of "onInIt()" function in your controller.js file .

or otherwise ,you use the busy Indicator in some case where your function is going to load and bind the data in the model to the view  here for your understanding i am adding some  sample code , so that you can able to understand

getItemsTap : function(oEvent){

  var supplierid = oEvent.getSource().data("id");

  var dialog = new sap.m.BusyDialog({

  text:'Loading Data...'

  });

  dialog.open();

  OData.read(

   "https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/BusinessPartnerCollection('" + supplierid + "')/SalesOrders?$top=40&$format=json",

   function (data) {

   dialog.close();

   myData.Sales = data.results;

   oModel.setData(myData);

   }

  );

Try to understand the above code so that you can get it easily and let me know if you have any problem

Thanks&Regards

Padma Mundru

Former Member
0 Likes

Hi  Padma,

        Thanks for your reply.

       But i need show busy indicator before loading the SAP UI5 Application.

Thanks,

Poornima.

padma_mundru
Participant
0 Likes

Hi Poornima,

 

As per your requirement you have to define the busy indicator in init() function.

or otherwise follow the below code it may be helpful for you.


view:

onBeforeShow : function(oEvent) {

  this.getController().onBeforeShows(oEvent);

  },

Controller:

onBeforeShow: function(oEvent){

  // declare the busy indicator

  },