1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    15
    Vote Rating
    0
    pbernardini is on a distinguished road

      0  

    Default navigation view back event

    navigation view back event


    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.

    Code:
    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'
                }
            }
        },

  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2010
    Location
    Omaha, NE
    Posts
    557
    Vote Rating
    25
    estesbubba will become famous soon enough estesbubba will become famous soon enough

      0  

    Default


    Did you give all your navigation bars the same itemId? If so that would be the problem.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    15
    Vote Rating
    0
    pbernardini is on a distinguished road

      0  

    Default


    Thanks, it seams that was the problem

Thread Participants: 1