I get null while trying to get loaded storage from the controller. The load is also successful. I checked it out.
I have a store as follows.
Ext.define('GridApp.store.schemedatastore',{
extend: 'Ext.data.Store',
model: 'GridApp.model.schemedatamodel',
autoLoad: true,
alias: 'store.schemedata',
storeId: 'schemedatastoreid',
constructor:function(){
console.log('Calling parent');
this.callParent(arguments);
},
listeners: {
load:function(store,records,isSuccessful){
if(isSuccessful){
console.log('Load successful');
}
console.log(records[0].get('name'));
console.log('scheme Data store loaded too.');
},
}
});
In my controller, I added:
stores: ['schemesstore',
'schemedatastore'],
I tried to access these paths in the controller,
Ext.getStore('schemedatastoreid');which returns null and
this.getschemedatastoreStore();which says it is an undefined function in the controller.
Am I missing something here?
source
share