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

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