您的位置:首页 > 其它

ext radio 获取值

2016-07-13 18:54 211 查看
var completePanel = new Ext.FormPanel({
layout:"table",
height:390,
defaults:{
labelAlign: 'right',
layout:"form",
border:false,
labelWidth:30,
bodyStyle:"padding:1px"
},
layoutConfig:{
columns:6
},
items:[{
labelWidth:60,
items:[{
xtype:"label",
fieldLabel:"处理结果"
}]
},{
labelWidth:1,
items:[{
xtype:"radio",
checked:true,
inputValue:"1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"成功",
labelSeparator:""
}]
},{
items:[{
xtype:"radio",
inputValue:"-1",
name:"result"
}]
},{
items:[{
xtype:"label",
fieldLabel:"失败",
labelSeparator:""//去掉label后面冒号
}]
},{width:100},{
colspan:6,
labelWidth:60,
items:[{
xtype:"textarea",
fieldLabel:"处理意见",
width:300
}]
}]
})

必须要定义成Ext.FormPanel 否者通过其他方式的获取不到

在items中定义value值也是无效的必须是inputValue  特别说明一下 inputValue的值不可以为0 否者会出现无法点击的现象

获取方式:var value = completePanel.getForm().findField("result").getGroupValue();

ok问题解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ext