-
29 Sep 2010 2:14 PM #1
Submit failure override
Submit failure override
How i can override standard form submit function?
I want have one failure handling funciton.
... doesn't work.Code:this.form.getForm().submit({ url: 'test', success: function () { } }); Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { failure: function () { } });
-
29 Sep 2010 8:54 PM #2
witch kind error can handler your failure submit method ?
-
29 Sep 2010 11:24 PM #3
I want have one default "failure" for all "submit".
-
30 Sep 2010 12:17 AM #4
For me if I need to know if my form is on defaut before submit, I use myForm.isValid() and intercept failure after submit is mangaged by ajax component... I don't understand what do you need exactly, sorry !
-
30 Sep 2010 2:53 AM #5
I want override standard failure function - so i do not have to enter it every time.
-
30 Sep 2010 5:05 AM #6
ok... so try this
ps: they are not failure function for Submit action, failure are manage on succes method... failure is about http failureCode:Ext.override(Ext.form.BasicForm, { initComponent: function () { Ext.form.BasicForm.superclass.initComponent.call(this); this.on('actionfailed', function (action) { // make what you need }, this); },
look source code
Code:// private success : function(response){ var result = this.processResponse(response); if(result === true || result.success){ this.form.afterAction(this, true); return; } if(result.errors){ this.form.markInvalid(result.errors); } this.failureType = Ext.form.Action.SERVER_INVALID; this.form.afterAction(this, false); },
Similar Threads
-
Submit always failure help!!!
By ratatuia in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 23 Nov 2011, 1:17 AM -
failure on form submit
By rishi89 in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 7 Jul 2010, 9:26 PM -
Action.Submit() returning failure
By dVyper in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 26 Nov 2008, 3:47 AM -
override Ajax failure handler globally
By wisecounselor in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 4 Dec 2007, 3:55 PM -
submit failure
By m0d in forum Ext 2.x: Help & DiscussionReplies: 10Last Post: 19 Nov 2007, 4:17 AM


Reply With Quote