Results 1 to 2 of 2

Thread: renderTpl inside textfield?

Hybrid View

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

    Default 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,553
    Answers
    3931
    Vote Rating
    1272
      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! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

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
  •