使用:
xtype: 'radiogroup',
fieldLabel: '栏目属性',
name : 'n_property',
columns: 1,
vertical: true,
width : 500,
items: [
{
boxLabel: '普通栏目(该栏目下为文章列表,常用于新闻中心等)',
name: 'n_property', inputValue: 'list',checked: true
},{
boxLabel: '链接栏目(该栏目下为一篇文章,常用于公司简介等)',
name: 'n_property', inputValue: 'link'
}
]
取值:
使用 getValue() 方法将返回一个Object对象,:
{‘n_property’:’list’},如果想得到具体值 list,需要自己获取。
如果在Form中使用getValues(),获取的是我们需要的Object对象,可直接操作。
动态赋值:
getValue和setValue是相反的操作,所以,赋值也需要传一个Object对象进去:
setValue({‘n_property’:’link’})
这样就选中 inputValue 为 link 的radio了