14 Nov 2012 1:06 PM #1
Unanswered: renderTpl inside textfield?
Hi, I'm trying to update https://github.com/chrisfarms/Ext.ux.../TokenField.js for Sencha 2.0 and I've almost finished it, but I'm having a bit of trouble with the renderTpl.
The outcome should be like this example:
I searched around on the forums and the only info I could find was that "There is no renderTpl for a field [anymore]" and I gather that I have to change this class to be based on Component rather than field.Text, but now I'm wondering how to get all the normal text-field functionality back. Do I have to, essentially, copy everything in Field and Text over to my custom Component? Or is there an easier way?
16 Nov 2012 9:19 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You should use either the getTemplate method or the template property (not config). You can see an example in this blog: http://www.sencha.com/blog/building-...onents-part-1/Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.