2013-04-06 55 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); 
}); 
相关问题