我在這裏有兩個分機組合框,當combobox1選擇事件調用時,我需要更改第二個組合框的值,我的問題是我不知道如何改變組合框的模型。如何從其定義的外部更改組合框(Ext JS)的模型
items: [{
xtype:'combo',
fieldLabel: 'Course',
afterLabelTextTpl: required,
store: new Ext.data.SimpleStore({
data: [
[1, 'Bsc CS'],
[2, 'MSc CS'],
],
id: 0,
fields: ['value', 'text']
}),
name: 'first',
listeners:{
select: function(combo, records, eOpts)
{
if(this.getValue()=="Bsc CS")
{
// Ext.get('semcombo').getStore.loadData(msc);
}
else if(this.getValue()=="MSc CS")
{
}
}
},
editable:false,
allowBlank: false
},{
xtype:'combo',
fieldLabel: 'Semester',
id : 'semcombo',
afterLabelTextTpl: required,
name: 'last',
allowBlank: false,
}
您是什麼意思的模型?記錄? – Reimius 2013-02-18 20:41:58
是的。我認爲模型是適合的。 – Bijoy 2013-02-19 04:57:12
那麼......模型實際上是定義單個記錄結構的對象。技術上這個術語是可以互換的,但在這種情況下,記錄更清晰。 – Reimius 2013-02-19 14:28:52