-
18 Jan 2013 11:15 AM #1
Unanswered: Set getItemTextTpl in Nested List from Controller?
Unanswered: Set getItemTextTpl in Nested List from Controller?
I have a nested list in my MVC application. Part of the template (getItemTextTpl) needs to be translated according to the current language.
This requires dynamically changing (or over-riding) the getItemTextTpl function.
I have tried all ways to do this - both in the view, and in the controller, but it just doesn't change.
Is this possible? How would it be achieved?
My latest attempt is this (in the controller):
Although this does alter the template, it's not getting the (node) parameter, so I can't do conditional formatting.Code:controller.getCurriculaList().getItemTextTpl=function(node){ return '<div>...</div>'; };
-
20 Jan 2013 8:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
I assume a list has already been shown in the NestedList, in that case you would have to set the itemTpl on the child lists that were already created. setItemTpl actually had a bug in ST 2.1.0 that will be fixed in 2.1.1
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.


Reply With Quote