on 10-07-2014 1:55 PM
Hi,
I am trying to cancel the navigation when toggling between two navigation items in UI5 Shell control,
like for example there are three navigation items nav_1(default item selected),nav_2,nav_3, if I navigate to nav_2 I want some validation to happen and stop the navigation to nav_2 similar to other navigation items.
I tried using workItemSelected event to see where the navigation has taken place and I will not proceed to set the content for nav_2 this is all fine, but the problem is navigation has already taken place to nav_2 which I want to avoid.
I want some event handler which gets triggered before event "workItemSelected" so that I can stop the navigation, I could not find any...
anyone got better ideas, please suggest.
Thanks,
Kranthi.
Hi Kranthi,
You can use preventDefault to cancel navigation between worksetItems. Try this:
worksetItemSelected: function(oEvent) {
if(validation....){
// Navigate between worksetItems
}else{
oEvent.preventDefault();
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.