1. #1
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    Answers
    1
    stefx is on a distinguished road

      0  

    Exclamation Unanswered: Render a select field into XTemplate

    Unanswered: Render a select field into XTemplate


    Hi, I need to render a select field into an XTemplate.

    I create a template function like this:
    Code:
    renderSelectQty: function(values){
    var sel = Ext.create('Ext.field.Select',{
            						value: '1',
             options: [{text: '1', value: '1'},  {text: '2', value: '2'}]
    });        return sel.element.dom.outerHTML;
    I can see the rendered select but I can't see the value (I try to select another value but still the same)...
    Where is the problem?

    I try also with new Ext.fieldSelect... but the same problem.
    Thanks a lot
    Stefano

  2. #2
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    612
    Vote Rating
    28
    Answers
    67
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    How do you use it with XTemplate?

  3. #3
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    Answers
    1
    stefx is on a distinguished road

      0  

    Default


    Because i need to have one select field on each record. Why this question?!?
    Thanks
    Stefano

  4. #4
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    612
    Vote Rating
    28
    Answers
    67
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    I asked how not why

    How exactly are you setting the XTemplate in your case.

  5. #5
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    Answers
    1
    stefx is on a distinguished road

      0  

    Default


    Sorry bluehipy... this my XTemplate:
    Code:
    itemTpl: new Ext.XTemplate('<div>{[this.renderSelectQty(values)]}</div>',{    renderSelectQty: function(values){
                 var sel = new Ext.field.Select({
                    value: '1',
                    options: [
                    {text: '1', value: '1'},
                     {text: '2', value: '2'},
                     {text: '3', value: '3'}
                ]
            });
            return sel.element.dom.outerHTML;
        }
    })


  6. #6
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    612
    Vote Rating
    28
    Answers
    67
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    and how is the resulting dom looking?

  7. #7
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    Answers
    1
    stefx is on a distinguished road

      0  

    Default


    Hi bluehipy, I'm looking for a select field in sencha style! But actually, the component, don't show the current value...

    Stefano

Thread Participants: 1

Tags for this Thread