1. #1
    Touch Premium Member
    Join Date
    Jan 2011
    Posts
    37
    Vote Rating
    0
    colworx is on a distinguished road

      0  

    Default Answered: Putting an xtype in an itempTpl

    Answered: Putting an xtype in an itempTpl


    Hi, I have a shopping cart in a List, and I want each item to have a selectfield in it as opposed to using plain old <select>.

    I would like to be able to define an xtype inside the XTemplate, like this:
    Code:
      itemTpl: new Ext.XTemplate(  
        '<tpl if="id == 0">',
          '<h1>Total</h1>',
        '</tpl>',
    
    
        '<tpl if="id &gt; 0">',
        '<div class="cart-product-wrap">',
              '<img class="orderitem-delete" src="/m/resources/images/delete.png" alt="" />',
              '<span class="cart-qty">',      
                '<label for="cart-qty-{id}">QTY: </label>',
                {
                  xtype: 'selectfield',           
                  name: 'qty',
                  id: 'qty',
                  options: [
                    {text: '1', value: '1'},        
                    {text: '2', value: '2'}         
                  ]
                },
              '</span>',
              '<span class="orderitem-text">{text}</span>',
              '<span class="orderitem-price">${price}</span>',
            '</div>',
        '</tpl>'
      ),
    Does anyone know how to do this, or another way of achieving my goal?

    Thanks.

  2. this might lead you in the right direction

    http://www.sencha.com/forum/showthre...-In-a-Template

  3. #2
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Moore, Oklahoma
    Posts
    456
    Answers
    8
    Vote Rating
    13
    Mthor will become famous soon enough

      0  

    Default


    this might lead you in the right direction

    http://www.sencha.com/forum/showthre...-In-a-Template

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar