-
1 Mar 2012 8:43 AM #1
Unanswered: how to update NavigationView title dynamically when I push in a view?
Unanswered: how to update NavigationView title dynamically when I push in a view?
Hi,
I have a NavigationView, and I need to change the title dynamically, how can I do that?
For example,
navView.push(AList) -> navView.push(BList)
The BList title should show some information related to the tapped item from AList.
-
1 Mar 2012 9:00 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
You can change the title of the item being pushed.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
8 Mar 2012 7:47 AM #3
And what if the panel already exists? When you pass an object (with the title) into setActiveItem() the content of the navigation panel doesn't refresh.
-
9 Mar 2012 1:29 AM #4
I have the same problem with setActiveItem : the title is not changing :
Look at this small code, when I click on the back button, the title is changing. but when I click on the button that calls "setActiveItem" it doesn't... why ??
Code:Ext.application({ name: 'myApp', launch: function() { var view = Ext.create('Ext.NavigationView', { fullscreen: true, items: [ { id:'mySecondView', title: 'Second', html: 'Second view!' }, { title: 'First', items: [ { xtype: 'button', text: 'show the other view!', handler: function() { view.setActiveItem('mySecondView'); } } ] } ] }); Ext.Viewport.add(view); } });
-
9 Mar 2012 3:24 AM #5
Just updated to the final version and it's fixed.


Reply With Quote