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 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 |
|---|---|
| 12 | |
| 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.