1 {layout:'column',border:false,anchor:'-20',items:[ 2 {columnWidth:.5,layout:'form',border:false,items:[{ 3 xtype: 'radiogroup', 4 itemId: 'isRemindGroup', 5 fieldLabel: '是否提醒<span style="color:red">*</span>', 6 items: [{ 7 xtype: 'radio', 8 boxLabel: '不提醒', 9 inputValue:false, 10 name: "isRemind", 11 checked: true, 12 listeners: { 13 'change': Ext.bind(this.setRemindDateDisable, this) 14 } 15 },{ 16 xtype: 'radio', 17 boxLabel: '提醒', 18 inputValue: true, 19 name: "isRemind", 20 listeners: { 21 'change': Ext.bind(this.setRemindDateEnable, this) 22 } 23 }] 24 }]} 25 ]},
赋值
1 setRadio: function(isTrue, radioGroup) { 2 radioGroup.items.each(function(item){ 3 item.setValue(false); 4 }); 5 if(isTrue) { 6 radioGroup.items.each(function(item){ 7 if(item.inputValue==true){ 8 item.setValue(true); 9 } 10 }); 11 } else { 12 radioGroup.items.each(function(item){ 13 if(item.inputValue==false){ 14 item.setValue(true); 15 } 16 }); 17 } 18 },
取值
1 var radioValue = formPanel.down('radiogroup[itemId=publishAllGroup]').getValue().publishAll;