1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    4
    Vote Rating
    0
    dbloom is on a distinguished road

      0  

    Default Unanswered: itemSelector for different nodes

    Unanswered: itemSelector for different nodes


    I am using the widget.dataview where i have two different type of nodes (file-list-item and folder-list-item) and the template goes something like this:

    tpl: ['<tpl for=".">',
    '<tpl if="folder==false">',
    '<div class="file-list-item">{name}</div>',
    '</tpl>',
    '<tpl if="folder==true">',
    '<div class="folder-list-item">{name}</div>',
    '</tpl>',
    '</tpl>'

    This displays fine, but when I go to select each type of node with the item selector defined as :
    itemSelector: '.folder-list-item',

    it handles the (folder-list-item) fine, but how do i configure the itemSelector to handle both type of nodes???

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try this
    Code:
    tpl: [
    '<tpl for=".">',
       '<tpl if="folder==false">',
            '<div class="node-list-item file-list-item">{name}</div>',
        '</tpl>',
        '<tpl if="folder==true">',
            '<div class="node-list-item folder-list-item">{name}</div>',
        '</tpl>',
    '</tpl>'
    Code:
    ...
    itemSelector: '.node-list-item'
    ...

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