Ext JS:如何重新加载多个商店?

Ext JS: How to reload multiple stores?

我在 ViewModel 中定义了几个商店,我有一个按钮可以将所有商店一起重新加载。我不想创建多个 var 来使用 Ext.getStore('sampleStore'),我只想 select 只使用一个 var 并且只使用一次 reload()

这是一个不完全的工作片段;

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: {}

尝试这样的事情:

    var panelStores = ['sampleStore1', 'sampleStore2', 'sampleStore3'];

    Ext.each(panelStores, function(eachStore) {
         var store = Ext.getStore(eachStore);
            if(store){
                store.reload();
            }
    }