【发布时间】:2018-09-15 14:14:11
【问题描述】:
我在ViewModel 中定义了几个商店,并且我有一个按钮可以重新加载所有这些商店。我不想创建多个var 来与Ext.getStore('sampleStore') 关联,而是只想用一个var 选择所有,并且只使用一次reload()。
这是一个不完全工作的sn-p;
refreshPanel: function () {
// This way only one of stores is reloading, its sampleStore1.
var panelStores = Ext.getStore('sampleStore1', 'sampleStore2', 'sampleStore3');
panelStores.reload();
}
这里是ViewModel中定义的商店:
stores: {
// I've tried to give a storeId name but ofcourse did not work!
//storeId: 'adminbonus',
sampleStore1: {
storeId: 'sampleStore1',
...
},
sampleStore2: {
storeId: 'sampleStore2',
...
},
sampleStore3: {
storeId: 'sampleStore3',
...
},
},
//And using several formulas with chainedstore or bindTo configs
formulas: {}
【问题讨论】:
标签: javascript extjs store reload