View Full Version : Ext.form.Action.Submit & Failure

20 Jul 2009, 10:48 AM
At the risk of asking another novice question, I recently started using the Observable class to add a function to a particular event of Ext object. I was wondering if there's something similar to this for the Ext.form.Action.Submit, where I could append a function to the failure of that action. As they have not events associated to them, how would this work?

Would I have to append my function to the 'requestexception' event of the Ext.Ajax object?


20 Jul 2009, 11:05 AM
Not sure what you're asking. When you submit a form, the underlying Submit action will then fire the success/failure handlers you specified in the form submit options.

20 Jul 2009, 1:33 PM
So what'd I'd like to do is have an override on that failure handler, without having to set it on every Ext.form.Action.Submit event I define in my application.

21 Jul 2009, 3:37 AM
So you want something like:

Ext.form.BasicForm.on('actionfailure', function(){
(Ext 3.x only)

21 Jul 2009, 10:08 AM

That's it. So the actionfailed event fires the failure method. Thanks.

p.s. sorry about the post to 3.0!