View Full Version : Ext.data.Connection handleFailure no longer accessible

23 May 2009, 12:10 PM
Maybe I'm missing something here, but in the past it was often very convenient to be able to handle topics like handleFailure globally. For example, I know that many within the community have done something similar to the following in Ext 2.x:

Ext.data.Connection.prototype.handleFailure = Ext.data.Connection.prototype.handleFailure.createInterceptor(function(response, e)
{ .... }

However, Ext 3.x it seems that this capability has been removed as the handleFailure method is now truly private and is not accessible even if you attempt to leverage the Ext.data.Connection.request method because not even an interceptor or override can access that method.

Is this truly by design?

Am I missing something here, is there a better way in Ext 3.0?

Why would extended and overridden methods not need to have access to things like handleFailure, handleResponse, doFormUpload and the like?

One of the powerful features of Ext is the ability to not only handle the normal day to day needs through inheritance but also to deal with bugs and the like. The ability to tack on functionality before and after methods within a base object helps to insure that core code can be leveraged while making slight adjustments.

As it sits, I can't even completely override the Ext.data.Connection.request method by replicating the code that is in that method exactly because the "private" methods are not available in that case either.

It just seems to me that a change like this is going to break a lot of code and force a lot of what seems like unnecessary rewriting of code while reducing the flexibility of Ext overall.

I'm certain I must be missing something; any insight here would be most helpful.

23 May 2009, 12:47 PM