Extjs3--radio的使用

 1 {layout:'column',anchor:'97%',items:[
 2                 {columnWidth:.5,layout:'form',border:false,items:[{
 3                     xtype: 'radiogroup',
 4                     itemId: 'isRemindGroup',
 5                     fieldLabel: '是否群发',
 6                     items: [{
 7                             xtype: 'radio',
 8                             boxLabel: '否',
 9                             inputValue:false,
10                             itemId:'publishAll',
11                             name: "bean.publishAll",
12                             checked: true,
13                             listeners: {
14                                  'check':this.setEnterEnable.createDelegate(this)
15                             }
16                         },{
17                             xtype: 'radio',
18                             boxLabel: '是',
19                             inputValue: true,
20                             itemId:'publishAll',
21                             name: "bean.publishAll",
22                             listeners: {
23                                 'check':this.setEnterDisable.createDelegate(this)
24                             }
25                     }]
26                 }]}
27             ]}

调用

 1 /**
 2      * 群发企业,禁用发送企业和选择企业
 3      * @param {} component
 4      * @param {} checked
 5      */
 6     setEnterDisable:function(component,checked){
 7         var form = this.formPanel.getForm();
 8         if(component.getValue()){
 9             form.findField('destinationNames').disable();
10             form.findField('chooseEnter').disable();
11         }
12     },
13     /**
14      * 非群发,启用发送企业和选择企业
15      * @param {} component
16      * @param {} checked
17      */
18     setEnterEnable:function(component,checked){
19         var form = this.formPanel.getForm();
20         if(component.getValue()){
21             form.findField('destinationNames').enable();
22             form.findField('chooseEnter').enable();
23         }
24     }

 

posted on 2014-03-11 15:50  看天空的星星  阅读(574)  评论(0编辑  收藏  举报

导航