PDA

View Full Version : navigation view back event



pbernardini
22 Oct 2012, 2:47 AM
Hi, I have an application that is base on tab panel. Each tab load an instance of a class that is base on navigation view.
When I push a view to the navigation I want to hide some button from the toolbar and show them when I go back to the first view of the navigation.
I setup a back event on each controller that handle each tab in order to achieve this.
Now, my problem is, that when I tap the back button on one tab, the event is caught from all other controllers too.
How can I get the event only from the navigationvew instance that I'm interest to.
Each instance has a unique id and currently I'm trying to reference it through this, which works when I have to reference the view but not for the back event.


config: { stores: [
'WalkAround'
],


refs: {
mainView: '#waNavBar carousel',
bar: '#waNavBar #navBar',
navPanel: {
autoCreate: true,
selector: '#waNavBar',
xtype: 'navPanel'
},
gallery: {
autoCreate: true,
selector: 'galleryView',
xtype: 'galleryView'
},
menuBtn: '#waNavBar button#menuNavBtn',
galleryBtn: '#waNavBar button#galleryWaBtn'
},


control: {
"#waNavBar carousel": {
activeitemchange: 'onActiveItemChange'
},
"list#menuListWalkaround": {
itemtap: 'onMenuListItemTap'
},
"#waNavBar button#menuNavBtn": {
tap: 'onMenuBtnTap'
},
"#waNavBar button#galleryWaBtn": {
tap: 'onGalleryBtnTap'
},
"#waNavBar container": {
showImage: 'onShowImage',
showVideo: 'onShowVideo'
},
"#waNavBar #navCarousel": {
show: 'onCarouselShow'
},
"galleryView#gallery": {
hide: 'onGalleryHide'
},
"#waNavBar": {
back: 'onNavigationviewBack'
}
}
},

estesbubba
22 Oct 2012, 6:38 AM
Did you give all your navigation bars the same itemId? If so that would be the problem.

pbernardini
22 Oct 2012, 7:24 AM
Thanks, it seams that was the problem