我不知道如何设置我的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;
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'
}]
}
);
}
我是法国人,很抱歉我的英语^^&#39; 谢谢