+ // private\r
+ createCallback : function(opts){\r
+ var opts = opts || {};\r
+ return {\r
+ success: this.success,\r
+ failure: this.failure,\r
+ scope: this,\r
+ timeout: (opts.timeout*1000) || (this.form.timeout*1000),\r
+ upload: this.form.fileUpload ? this.success : undefined\r
+ };\r
+ }\r
+};\r
+\r
+<div id="cls-Ext.form.Action.Submit"></div>/**\r
+ * @class Ext.form.Action.Submit\r
+ * @extends Ext.form.Action\r
+ * <p>A class which handles submission of data from {@link Ext.form.BasicForm Form}s\r
+ * and processes the returned response.</p>\r
+ * <p>Instances of this class are only created by a {@link Ext.form.BasicForm Form} when\r
+ * {@link Ext.form.BasicForm#submit submit}ting.</p>\r
+ * <p><u><b>Response Packet Criteria</b></u></p>\r
+ * <p>A response packet may contain:\r
+ * <div class="mdetail-params"><ul>\r
+ * <li><b><code>success</code></b> property : Boolean\r
+ * <div class="sub-desc">The <code>success</code> property is required.</div></li>\r
+ * <li><b><code>errors</code></b> property : Object\r
+ * <div class="sub-desc"><div class="sub-desc">The <code>errors</code> property,\r
+ * which is optional, contains error messages for invalid fields.</div></li>\r
+ * </ul></div>\r
+ * <p><u><b>JSON Packets</b></u></p>\r
+ * <p>By default, response packets are assumed to be JSON, so a typical response\r
+ * packet may look like this:</p><pre><code>\r
+{\r
+ success: false,\r
+ errors: {\r
+ clientCode: "Client not found",\r
+ portOfLoading: "This field must not be null"\r
+ }\r
+}</code></pre>\r
+ * <p>Other data may be placed into the response for processing by the {@link Ext.form.BasicForm}'s callback\r
+ * or event handler methods. The object decoded from this JSON is available in the\r
+ * {@link Ext.form.Action#result result} property.</p>\r
+ * <p>Alternatively, if an {@link #errorReader} is specified as an {@link Ext.data.XmlReader XmlReader}:</p><pre><code>\r
+ errorReader: new Ext.data.XmlReader({\r
+ record : 'field',\r
+ success: '@success'\r
+ }, [\r
+ 'id', 'msg'\r
+ ]\r
+ )\r
+</code></pre>\r
+ * <p>then the results may be sent back in XML format:</p><pre><code>\r
+<?xml version="1.0" encoding="UTF-8"?>\r
+<message success="false">\r
+<errors>\r
+ <field>\r
+ <id>clientCode</id>\r
+ <msg><![CDATA[Code not found. <br /><i>This is a test validation message from the server </i>]]></msg>\r
+ </field>\r
+ <field>\r
+ <id>portOfLoading</id>\r
+ <msg><![CDATA[Port not found. <br /><i>This is a test validation message from the server </i>]]></msg>\r
+ </field>\r
+</errors>\r
+</message>\r
+</code></pre>\r
+ * <p>Other elements may be placed into the response XML for processing by the {@link Ext.form.BasicForm}'s callback\r
+ * or event handler methods. The XML document is available in the {@link #errorReader}'s {@link Ext.data.XmlReader#xmlData xmlData} property.</p>\r
+ */\r
+Ext.form.Action.Submit = function(form, options){\r
+ Ext.form.Action.Submit.superclass.constructor.call(this, form, options);\r
+};\r
+\r
+Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {\r
+ <div id="cfg-Ext.form.Action.Submit-errorReader"></div>/**\r
+ * @cfg {Ext.data.DataReader} errorReader <p><b>Optional. JSON is interpreted with\r
+ * no need for an errorReader.</b></p>\r
+ * <p>A Reader which reads a single record from the returned data. The DataReader's\r
+ * <b>success</b> property specifies how submission success is determined. The Record's\r
+ * data provides the error messages to apply to any invalid form Fields.</p>\r
+ */\r
+ <div id="cfg-Ext.form.Action.Submit-clientValidation"></div>/**\r
+ * @cfg {boolean} clientValidation Determines whether a Form's fields are validated\r
+ * in a final call to {@link Ext.form.BasicForm#isValid isValid} prior to submission.\r
+ * Pass <tt>false</tt> in the Form's submit options to prevent this. If not defined, pre-submission field validation\r
+ * is performed.\r