I have a store `APP.store.Posts` that I want to instantiate 3 different times. They will all hold the same type of data, but will be using different parameters when reloading, paging, etc. In a controller, I do this in the `onLaunch` function.
Code:
onLaunch: function() {
Ext.create('APP.store.Posts',{
storeId: 'unclassifiedPosts'
});
Ext.create('APP.store.Posts',{
storeId: 'positivePosts'
});
Ext.create('APP.store.Posts',{
storeId: 'negativePosts'
});
},
Then later, in the `beforerender` listener methods I created on the controller, I do this:
Code:
beforeRenderPostsGrid: function(grid) {
var store = Ext.getStore('unclassifiedPosts');
store.load();
},
beforeRenderPositivePostsGrid: function(grid) {
var store = Ext.getStore('positivePosts');
store.getProxy().extraParams = {'some_param' : 'some_value'};
store.load();
var checkOtherStore = Ext.getStore('unclassifiedPosts'); //THIS STORE NOW HAS SAME PARAMS AS positivePosts STORE
},
The problem is, whichever `beforerrender` grid is called last, all 3 stores have those parameters. So the initial load is fine, but if I do any refresh, paging, etc. They all show the same data b/c the proxies for each store have identical extraParams somehow.
From what I understood, the `storeId` parameter was supposed to make my store unique, so am I missing a step?