안녕하세요, 안녕하세요, stackoverflow 친구들! 동적 체크 박스, 라디오, 체크 박스 그룹, 라디오 그룹 extjs
나는 stackowerflow에서이 문제에 대해 검색하지만 그들 중 누구도 나를my model is like that:
Ext.define('soru', {
extend : 'Ext.data.Model',
fields : [{
name : 'CEVAP',
type : 'string'
},
{
name : 'VALUE',
type : 'int'
},
{
name : 'RECNO',
type : 'int'
}
]
});
에 대한 helpfull입니다 그리고 내 가게 같은 것입니다 :
checkboxArray = [];
var myStoresoru = Ext.create('Ext.data.Store', {
model : 'soru',
id:'sorustore',
proxy : {
type : 'ajax',
url : 'fetchsoru.php',
reader : {
type : 'json',
root : 'data'
}
},
listeners: {
load: function(value, records, options) {
for(var i = 0; i < records.length; i++) {
console.log(records);
console.log(records.length);
checkboxArray.push(new Ext.form.Checkbox(
{
boxLabel: value.data.items[i].data.CEVAP,
name: value.data.keys[i],
xtype: 'checkbox',
inputValue: value.data.items[i].data.VALUE,
id: value.data.items[i].data.RECNO
}));
//{id: records[i].data.id, boxLabel: records[i].data.pagetitle});
}
}
},
autoLoad : false
});
myStoresoru.load();
내 checkboxgroup 같은 것입니다 :
var check= new Ext.form.CheckboxGroup({
xtype: 'checkboxgroup',//combo çoklu seçim olmalı
fieldLabel: 'İklimsa’yı tercih nedeniniz? ',
//store: myStoresoru,
labelWidth:300,
//columns:2,
name : 'tercih',
id : 'tercih',
itemId: 'tercih',
hiddenName: 'tercih',
items:[checkboxArray]
}};
및 형태 :
잘form = Ext.create('Ext.form.Panel', { items : [check]
});
내 질문에 체크 박스에서 checkboxgroup을로드하지 않습니다 내가 콘솔에 checckboxArray를 입력 할 때 내가 checckboxArray이 존재하는 것을 볼 수 있지만 checckboxes가 표시되지 않는 이유 내가 아는 해달라고입니다
.