Results 1 to 7 of 7

Thread: How to override navigationview back button?

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default Answered: How to override navigationview back button?

    Hi I have a navigation view with a button that pushes a nestedlist. I set the useToolbar config for the nestedlist to false so I wouldn't have two back buttons. When navigating through the list I would like to have it so the navigationview takes into account the view changes that happens. What I'm trying to do is have the navigation view back button go back in the list also. Thanks in advance

  2. Extend the navigation view and override the onBackButtonTap method.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Extend the navigation view and override the onBackButtonTap method.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    thanks went another route.

  5. #4
    Sencha User
    Join Date
    May 2012
    Posts
    24
    Vote Rating
    -6
      0  

    Default

    how to do that? Im sorry can not get it.

  6. #5
    Sencha User
    Join Date
    May 2012
    Posts
    24
    Vote Rating
    -6
      0  

    Default

    mitchellsimoens please guide some code please can not search for any thread teach about it.

  7. #6
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      1  

    Default

    Code:
    Ext.define('Ux.navigation.View', {
        extend : 'Ext.navigation.View',
        xtype  : 'ux-navigationview',
    
        onButtonTap : function() {
            if (some logic) {
                //optionally you can call the Ext.navigation.View via:
                this.callParent(arguments);
            }
        }
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  8. #7
    Sencha User
    Join Date
    May 2012
    Posts
    24
    Vote Rating
    -6
      0  

    Default

    thank you that work!!

    but can I find default logic of navigationbar and nested list toolbar. can i use that class or i have to write all new.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •