Results 1 to 2 of 2

Thread: Navigation View - Changing Title does not work on Back Button

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Location
    Australia, Brisbane
    Posts
    22

    Default Navigation View - Changing Title does not work on Back Button

    I have a Tab Panel as my initial item inside a Navigation View. When I change tab, I'm updating the Title in the Navigation Bar via:

    Code:
    activeitemchange: function(container){
    	var navigationView = container.up('navigationview'),
    		navigationBar = navigationView.getNavigationBar(),
    		newTabTitle = value.tab._title;
    
    
    
    
    	navigationBar.setTitle(newTabTitle);
    }
    The problem is that when I push a new view onto the Navigation View, the Text for the Back Button uses the old/original Title, and not the updated Title. Clicking the Back Button also sets the Navigation View Title to the old/original Title.

    The closest I got to finding a solution was this:
    http://www.sencha.com/forum/showthre...tle-(IPad-App)

    But I get an 'undefined' error on the navigationBar.refreshProxy() call, so I'm assuming that only works for an older version of ST.

    Any help would be great,
    Thanks.
    Last edited by Brett889; 13 Feb 2013 at 6:08 PM. Reason: added event activeitemchange to code

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Germany
    Posts
    72
    Answers
    8

    Default

    Hi Brett why not set the title on the initial?

    like:

    Code:
    Tabpanel
    items: [{
    {xtype: 'tab1', title : 'myTitle1'}
    },
    {
    {xtype: 'tab2', title : varWithvalueForMyTitle} 
    // From a singleton or a store
    },
    
    ]

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
  •