PDA

View Full Version : [OPEN] [FIXED][3.0RC1] DataProxy Broken -- overwrites its own request method



jacombs
30 Apr 2009, 3:01 AM
Somebody has added the line in red below to the constructor for DataProxy:



Ext.data.DataProxy = function(conn){
// make sure we have a config object here to support ux proxies.
// All proxies should now send config into superclass constructor.
conn = conn || {};

Ext.apply(this, conn);
Either this is wrong or you've decided to change the interface for DataProxy.

Now if you pass an Ext.data.Connection object in the constructor, its request method
will overwrite the proxies request method, which results in general mayhem.

Is this by design? Or a mistake?

christocracy
30 Apr 2009, 9:36 PM
Yes, I was worried this would eventually cause an issue. It's related to implementing the new api-configuration parameter.

I've removed the Ext.apply(this, conn) and set the api and url manually.

Committed.

ejatin
10 Feb 2011, 4:08 AM
caution :

whenever you extend Ext.data.DataProxy, a default constructor must be specified, even when it simply calls superclass only (a desired behavior when you do not specify constructor in child class), due to above fix.