View Full Version : [OPEN-1094] listening of DataProxy events DirectStore load events fails

1 Jul 2010, 9:21 PM
The Topic say it all, so to keep it short: I've tried it twice and both times all load events fails. I've got a little showcase online with a direct link to the code:

EDIT: links removed due to the bug definition below...

1 Jul 2010, 11:43 PM
What exactly "fails"? What goes wrong, where?

1 Jul 2010, 11:44 PM
I just looked at the source

DirectProxy does not fire a load event.

(on edit): Oops! It does! I searched for 'load' and the code has "load"

Good case for code standardization!

1 Jul 2010, 11:49 PM
According to the API DirectProxy extends DataProxy which fires load events. So DirectProxy should...?

I tested it with 3.1 and 3.2.x

In both cases no load events fired, as you can see in the simple direct showcase

2 Jul 2010, 12:25 AM
Weird. It's just load which doesn't work.

I just typed this into the firebug console of a random examples page

Ext.data.DataProxy.addListener('load', function (proxy, action) {
Ext.data.DataProxy.addListener('write', function (proxy, action) {
p = new Ext.data.DataProxy();

And only got the "write" logged!

2 Jul 2010, 12:28 AM
My talking ... ;)

2 Jul 2010, 12:32 AM
Only a few are relayed through the class

The source has

// relay each proxy's events onto Ext.data.DataProxy class for centralized Proxy-listening
Ext.data.DataProxy.relayEvents(this, ['beforewrite', 'write', 'exception']);

I don't know why only that subset of instance events are relayed through the class.

Dev team?