PDA

View Full Version : [CLOSED] Store exception event



bogc
Apr 05, 2013, 8:00 PM
Hello:

I noticed that in the ExtJs 4.1 docs (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store) there is no Store exception event, the exception event belongs actually to the store AjaxProxy (I am using an AjaxProxy and see this: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.proxy.Ajax). However, Ext.Net contains an exception event whose handler can be set via the store.Listeners.Exception property.

1. If I use store.On('exception', ....), does it work correctly as well as an alternate method to setting the handler via store.Listeners.Exception? I didn't look at the code but I assumed that it does and Ext.Net does some magic to wire this event properly.

2. I noticed that the Ext.Net c# object AjaxProxy does not support the On methods way of setting the event listeners. Why is that?

Thanks

Baidaly
Apr 06, 2013, 9:28 PM
Hello!

Yes, Ext.NET overrides AbstractStore to add some functionality including exception event.


1. If I use store.On('exception', ....), does it work correctly as well as an alternate method to setting the handler via store.Listeners.Exception? I didn't look at the code but I assumed that it does and Ext.Net does some magic to wire this event properly.

Yes, you can use both approaches to add event listeners.


2. I noticed that the Ext.Net c# object AjaxProxy does not support the On methods way of setting the event listeners. Why is that?

AjaxProxy doesn't have On method because it's not inherited from Observable class. You should use Listeners to add events.

bogc
Apr 06, 2013, 10:37 PM
Thank you. You can close the thread.