-
16 Feb 2012 4:30 AM #1
Unanswered: Controller Question - > target view and nested elements
Unanswered: Controller Question - > target view and nested elements
How do I get my controller to make a change to a view. In my case I want to change the title of a titlebar as the section changes. I have the event happening in the controller fine but I cant seem to do the following
the controller...you can see what I'm trying to do from here - thanks. Also handy to know how to hit nested elements that is framework friendly.Code:onTabChange:function(){ alert(this.mainLayout); //console.log(Ext.widget('titlebar').getTitle()); var tb=Ext.widget('titlebar'); //Ext.widget('titlebar').setTitle('abc') }
-
16 Feb 2012 7:20 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Where is the titlebar in relation to the tabpanel? If it is already created then you need to resolve it.
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.
-
16 Feb 2012 7:54 AM #3
The titlebar is actually in the original viewport, but for any controller created with a view by naming convention how would I access the view ?
T
-
16 Feb 2012 9:00 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Use ComponentQuery and the convenient methods on each component to move up and down the hierarchy to resolve your titlebar.
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.
-
16 Feb 2012 9:55 AM #5
Thanks
Thanks
console.log(Ext.ComponentQuery.query('#market'));
errors to Uncaught TypeError: Cannot call method 'query' of undefined


Reply With Quote