X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/src/form/action/StandardSubmit.js diff --git a/src/form/action/StandardSubmit.js b/src/form/action/StandardSubmit.js new file mode 100644 index 00000000..641f59d1 --- /dev/null +++ b/src/form/action/StandardSubmit.js @@ -0,0 +1,34 @@ +/** + * @class Ext.form.action.StandardSubmit + * @extends Ext.form.action.Submit + *

A class which handles submission of data from {@link Ext.form.Basic Form}s using a standard + * <form> element submit. It does not handle the response from the submit.

+ *

If validation of the form fields fails, the Form's {@link Ext.form.Basic#afterAction} method + * will be called. Otherwise, afterAction will not be called.

+ *

Instances of this class are only created by a {@link Ext.form.Basic Form} when + * {@link Ext.form.Basic#submit submit}ting, when the form's {@link Ext.form.Basic#standardSubmit} + * config option is true.

+ */ +Ext.define('Ext.form.action.StandardSubmit', { + extend:'Ext.form.action.Submit', + alias: 'formaction.standardsubmit', + + /** + * @cfg {String} target + * Optional target attribute to be used for the form when submitting. If not specified, + * the target will be the current window/frame. + */ + + /** + * @private + * Perform the form submit. Creates and submits a temporary form element containing an input element for each + * field value returned by {@link Ext.form.Basic#getValues}, plus any configured {@link #params params} or + * {@link Ext.form.Basic#baseParams baseParams}. + */ + doSubmit: function() { + var form = this.buildForm(); + form.submit(); + Ext.removeNode(form); + } + +});