Results 1 to 2 of 2

Thread: renderTpl inside textfield?

  1. #1
    Sencha User firekesti's Avatar
    Join Date
    Sep 2012
    Posts
    22
    Answers
    2
    Vote Rating
    1
      0  

    Default 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:
    http://chrisfarms.github.com/Ext.ux/...okenField.html

    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?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,316
    Answers
    3881
    Vote Rating
    1290
      0  

    Default

    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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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 in print!

    When posting code, please use BBCode's CODE tags.

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
  •