View Full Version : Global Model Proxy Listener

Peter Tierney
7 Sep 2013, 9:17 AM
Hello all:

I currently have a controller that does all kinds of app diagnostics. One of the things it does is to listen to all the stores in the app and report all kinds of useful information. I've done it this way for numerous reasons, but one big reason is that as any dev works on the project, they don't do anything more than create a store and this listener will see it. To get this to work with the stores I use

store: {
'*': {
beforeload: this.handleStoreBeforeLoad,
load: this.handleStoreLoad,
loadexception: this.handleStoreException,
write: this.handleSaveCalls

This works perfectly for stores. Now I have a model with a proxy and the above listener does not catch those calls, which actually makes sense.

The question is: since a model doesn't have events and a proxy only really has two, what can I listen to in a similar above fashion to catch what's going on with the model proxy operations?


9 Sep 2013, 12:05 AM
You will need to create your own Event Domain (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.app.EventDomain) for Proxies.