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
    464
    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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi