{
fieldLabel: 'Tip',
name: 'SubjectType',
allowBlank: false,
xtype: 'combo',
displayField: 'name',
valueField: 'type',
typeAhead: true,
forceSelection: true,
queryMode: 'local',
store: subjectTypeStore,
listeners: {
select: function(a,selected,c){
//console.log(a);
var tets = selected[0].data.type;
console.log(tets);
//console.log(c);
}
}
},
{
name: 'SubjectID',
allowblank: false,
xtype: 'combo',
displayField: 'name',
valuefield: 'name',
typeAhead: true,
forceSelection: true,
queryMode: 'local'
}
私がやりたいのは、最初のコンボボックスで選択した項目に従って、コンボボックスストアを2番目のコンボボックスに適用することです。たとえば、ポケモンを選択した場合、2番目のコンボボックスはpokemonStoreをロードする必要があります。気が変わってSmurfsを選択すると、2番目のコンボボックスがsmurfsStoreをロードします。
私が学びたいのは、ストアを既存のコンボボックスに適用する方法です。