So, I have two stores that use the same model, they are absolutely identical in all respects (except for their names, of course). I want two different shops.
app.stores.newsFeed = new Ext.data.Store({ model: 'app.models.feedData', proxy: { type: 'scripttag', url: 'http://query.yahooapis.com/v1/public/yql', extraParams: { format: 'json' }, reader: { root: 'query.results.item' } } }); app.stores.eventsFeed = new Ext.data.Store({ model: 'app.models.feedData', proxy: { type: 'scripttag', url: 'http://query.yahooapis.com/v1/public/yql', extraParams: { format: 'json' }, reader: { root: 'query.results.item' } } });
My question is, can I save space by getting rid of the code and using only one store instance, so I donβt need to declare a new new Ext.data.Store file again?
sort of:
store = new Ext.data.Store(...); app.stores.newsFeed = store; app.stores.eventsFeed = store;
I tried this before, but both of them were tied to the same repository, so when it was changed, it was different.
source share