2016-07-27 4 views

答えて

0

コンボボックス内のデータは、コンボボックスの作成時に指定したstore設定項目によって決まります。次の例では:

// The data store containing the list of states 
var states = Ext.create('Ext.data.Store', { 
    fields: ['abbr', 'name'], 
    data : [ 
     {"abbr":"AL", "name":"Alabama"}, 
     {"abbr":"AK", "name":"Alaska"}, 
     {"abbr":"AZ", "name":"Arizona"} 
    ] 
}); 

// Create the combo box, attached to the states data store 
Ext.create('Ext.form.Panel', { 
    items: [{ 
    xtype: 'combo', 
    store: states //Change your store here 
    }], 
    ..... 
}); 

異なる場所でコンボボックスを作成している間、ちょうどあなたがその店をインスタンス化する方法に基づいてされるだろう異なる店舗とそのコンボにロードされたデータへの参照を与えます。詳細については、api hereを参照してください。

関連する問題