bstras21
16 Dec 2011, 9:15 AM
Hello, I see in the source code for a store that onProxyLoad fires:
me.fireEvent('load', me, records, successful);However I can't seem to access it. I am creating a base store that all other stores descend from and I would like to capture this event:
Here is my custom.store:
Ext.define('MyApp.custom.Store', {
extend: 'Ext.data.Store',
listeners: {
load: function() {
alert('load event fired!');
}
}
});
Now in my controller I do this:
onLaunch: function() {
languageStore = this.getLanguageStoreStore();
languageStore.load({
scope : this,
callback: function(records, operation, success) {
console.log(records);
}
})
If I extend onProxyLoad I can get my code to work but it seems they want us to use the load event. Any help is greatly appreciated, thanks!
me.fireEvent('load', me, records, successful);However I can't seem to access it. I am creating a base store that all other stores descend from and I would like to capture this event:
Here is my custom.store:
Ext.define('MyApp.custom.Store', {
extend: 'Ext.data.Store',
listeners: {
load: function() {
alert('load event fired!');
}
}
});
Now in my controller I do this:
onLaunch: function() {
languageStore = this.getLanguageStoreStore();
languageStore.load({
scope : this,
callback: function(records, operation, success) {
console.log(records);
}
})
If I extend onProxyLoad I can get my code to work but it seems they want us to use the load event. Any help is greatly appreciated, thanks!