on 12-04-2015 12:48 PM
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
Hi Ansuman,
In the second view, is the variable 'a' defined?
Regards,
Naren L Naik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.