-
3 May 2012 3:05 AM #1
New base class for stores
New base class for stores
I would like to add a listener to several stores in my application. Instead of defining the listener for each stores it would be more elegant to define a new store class where the listeners defined and use that class as the base class of my stores. I.e. instead of having
I would like to haveCode:Ext.define('MyApp.store.offlineCustomer', { extend: 'Ext.data.Store',
where MyStore is the class where the shared listeners are defined.Code:Ext.define('MyApp.store.offlineCustomer', { extend: 'Ext.data.MyStore',
Is there any way to implement it in Architect? Or the only one solution is to add the listeners to each class individually?
-
3 May 2012 6:15 AM #2
at some point I would like to do the same thing. in my case, i want a listener to intercept all ajax calls from any store i define to determine if server session is still active.
did you try to make this work using your sample below? if not, give it a whirl and let us know what you experience.
-
3 May 2012 6:19 AM #3
I can not see how can I define the base class in Architect. When the store is created in Architect the code in the sample is auto generated. So I can not see any way to add my 'extend' bit.


Reply With Quote