View Full Version : Store Manager Events

Peter Tierney
10 May 2013, 9:44 AM
Hello all:

I'd like to be able to monitor the request/response of any store I have defined in the application. I realize there is a Ext.data.StoreManager but that doesn't look like what I'm hoping to find. Now I know I can get a listing of stores from the store manager, but I'm not seeing where the stores keep track of their requests and/or responses. I'm not looking for the actual data returned, but rather stats on how the requests are performing and maybe a generic error handler I can create without handling it in each store file.

Does anyone have a suggestion on how to best get this data? Thanks.

10 May 2013, 12:39 PM
Could you elaborate on what you mean by "stats on how the requests are performing"?

Based on what you've said, maybe the best thing would be to extend the Store class and add listeners within that extended class. Then use the extended class for your stores instead of the Ext.data.Store class. That way you don't need to keep adding listeners to every single store you create.

10 May 2013, 12:48 PM
Use Store event domain: http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.app.Controller-method-listen


Peter Tierney
23 May 2013, 8:32 PM
Using the listen method works albeit to get what I want as far as stats, I need to utilize 2 listeners on the stores.

Thanks nohuhu

store: {
'*': {
beforeload: this.handleStoreBeforeLoad,
load: this.handleStoreLoad