正确做法:
{xtype:'radiogroup',hideLabel:false,name:'material.isProduceMaterial',fieldLabel:'是否为生产原料',
items : [
{
boxLabel:'是',
name:'material.isProduceMaterial',inputValue:'Y',checked: true,
listeners:{'check':function(checkbox,checked){
if(checked){
Ext.getCmp("defaultWarningId").setDisabled(false);
var data = gridPanel.getSelectionModel().getSelections()[0].data;
Ext.getCmp("defaultWarningId").setValue(data.defaultWarning);
};
}}
},
{
boxLabel:'否',
name:'material.isProduceMaterial',inputValue:'N',
listeners:{'check':function(checkbox,checked){
if(checked){
Ext.getCmp("defaultWarningId").setDisabled(true);
Ext.getCmp("defaultWarningId").setValue("0");
};
}}
}
]
}}