Extjs4 extjs 4-放射组值
我不知道如何设置我的radiobutton组的值。值“GP”或“P”在表“listSites”中取值 代码如下:Extjs4 extjs 4-放射组值,extjs4,radio-group,Extjs4,Radio Group,我不知道如何设置我的radiobutton组的值。值“GP”或“P”在表“listSites”中取值 代码如下: for (i = 0; i < me.dataSite.length; i++) { siteName = me.dataSite[i].name;// data site is a table of object site with his id and name. idSite = me.dataSite[i].id;
for (i = 0; i < me.dataSite.length; i++) {
siteName = me.dataSite[i].name;// data site is a table of object site with his id and name.
idSite = me.dataSite[i].id;
Type = me.listSites['site' + idSite]; // listSite is a table that contains the type of site it takes the value 'P' or 'GP'
itemsArray.push(
{
xtype: 'radiogroup',
fieldLabel: siteName,
labelWidth: me.defaultLabelWidth,
width: '100%',
border: false,
defaults: {
padding: '0 20 0 0',
xtype: 'radio',
name: 'listSite' + idSite,
value: Type // here's the problem
},
layout: 'hbox',
items: [
{
boxLabel: ressources.RadioGroupeProduitBoxLabel,
inputValue: 'GP'
},
{
boxLabel: ressources.RadioProduitBoxLabel,
inputValue: 'P'
}]
}
);
}
for(i=0;i
我是法国人,我的英语很抱歉
谢谢在收音机上指定
checked:true
。我不能使用“checked:true”,因为收音机的默认值取决于变量“Type”的值–当然可以<代码>选中:类型===“GP”它可以工作!!非常感谢。