I am getting null while I try to obtain a loaded store from the controller. The load is a successful one too. I verified that.
I have the 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 like,
stores: ['schemesstore',
'schemedatastore'],
I tried accessing in these both ways in the controller,
Ext.getStore('schemedatastoreid');
which returns null and
this.getschemedatastoreStore();
which says it is an undefined function in controller.
Am I missing something over here?