on ‎2014 Dec 11 6:26 AM
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.
Request clarification before answering.
Hi Poornima
I am facing the same problem. Have you found any solution?
Regards
Parth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
},
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.