I have 2 options to create the store and use it across my app but I can't decide which is best or why: I can either use:
Ext.regStore('CustomerList', {
and use
store:'CustomerList',
and
Ext.StoreMgr.get('CustomerList')
OR
HSA.stores.CustomerList = new Ext.data.Store({
and use:
HSA.stores.CustomerList
Which one is the best way to be handling stores and why (and in which case)? cheers
Jason Rogers
I use MVC with Sencha Touch and create/access my stores in the following manner:
Ext.regStore('Updates', { });
var updatesStore = Ext.getStore("Updates");
Note that when I am not using MVC, I create the store in the same manner but access it by using the app's namespace like so:
app.stores.updates.load();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.