2009-07-31 8 views
0

클릭 이벤트에 라디오 버튼을 추가하십시오. 하지만 작동하지 않습니다. 내 코드 :Extjs 라디오 addevent 문제

RadioPanel는 :

RadioPanels = new Ext.Panel({ 
        layout: 'table', 
        id: 'newRadioEdit', 
        name: 'newRadioEdit', 
        //title:'Servis Durumu', 
        bodyStyle: Ext.isIE ? 'padding-left:35px;' : 'padding-left:35px;', 
        layoutConfig: { 
         columns: 2 
        }, 
        anchor: '100%', 
        defaults: { 
         border: false, 
         layout: 'form', 

         labelWidth: 15, 
         style: { 
          paddingRight: '10px' 
         } 
        } 
       }); 
var radio= new Ext.form.Radio({ 
     name: 'SERVIS_DURUMU', 
     inputValue: '1', 
     boxLabel: 'Test', 
     style: { 
      marginRight: '10px' 
     } 
    }); 
    radio.addListener('click',function() { 
     alert("yihuuu"); 
    }); 
RadioPanels.add(radio); 

답변

2

이벤트가 체크하지 클릭입니다.

radio.addListener('check',function() { 
    alert("yihuuu"); 
});