2013-04-06 19 views
0
this.items[0].tpl = Ext.create('Ext.XTemplate', 
    '{[this.tempValue()]}', 
    '<tpl for=".">', 
     '<tpl if="this.temp != title">', 
      '<h3 class="dataview-title">{title}</h3>', 
      '{[this.isTitle(values.title)]}', 
     '</tpl>', 
    '<div class="download-file">', 
    '<input type="checkbox" value="{title}/{filename}"> ', 
    '&nbsp;{filename}</div>', 
    '</tpl>', 
    '<div class="x-clear"></div>', 
    { 
     isTitle: function (title) { 
      this.temp = title; 
     }, 
     tempValue: function() { 
      this.temp = ''; 
     } 
    } 
); 

我已經打開一個彈出窗口,並顯示使用數據視圖模板複選框一些文件名(ExtJS的-4.1.1)在我不知道,如何讓所選文件名的長度爲(複選框選定項目)。你能否用例子來解釋我?在數據視圖獲取選定的文件名(ExtJS的)

回答

0

您將需要查詢DOM:

dv.el.select('input:checked').each(function(el){ 
    console.log(el.value); 
});