2009-07-31 66 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"); 
});