2013-04-06 4 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 = ''; 
     } 
    } 
); 

내가 하나 개 팝업 창을 열고 DataView를 템플릿을 사용하여 체크 박스 일부 파일 이름을 (에 extjs-4.1.1) 점에서 나도 몰라, 어떻게 얻을 보여주는 한 의 파일 이름은 (선택한 항목은 선택란)입니다. 예를 들어 설명해주십시오.DataView를 선택 파일 이름을 가져옵니다 (에 extjs)

답변

0

당신은 DOM 조회해야합니다 :

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