on 01-16-2017 8:30 AM
Hello,
I have a question on using IconTabBar
I want to control the switching process of the tabs as follows:
if I want to switch to another tab, there will be a MessageBox showing up, asking if I am sure to leave the current tab, if I press OK, then the tab will be switched. If I press cancel, I will stay in the current tab.
I have tried a few methods, but failed. I wonder if there is a way to achieve this?
Thanks!
Hi Natalie Zhang ,
You need to handle this on select event of sap.m.IconTabBar control. Please check out this sample code below:
View (XML)
Controller (JS)
onInit:function(){
this._selectedKey = this.getView().byId("idIconTabBar").getSelectedKey();
},
onSelectTab:function(oEvent){
var skey = oEvent.getParameter("key");
var src = oEvent.getSource();
var self = this;
}
});
thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.