You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
27 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_form_Action_Submit({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.form.Action.DirectSubmit"],"extends":"Ext.form.Action","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.form.Action' rel='Ext.form.Action' class='docClass'>Ext.form.Action</a><div class='subclass '><strong>Ext.form.Action.Submit</strong></div></div><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Ext.form.Action.DirectSubmit' rel='Ext.form.Action.DirectSubmit' class='docClass'>Ext.form.Action.DirectSubmit</a></div><h4>Files</h4><div class='dependency'><a href='source/Action2.html#Ext-form-Action-Submit' target='_blank'>Action.js</a></div></pre><div class='doc-contents'><p>A class which handles submission of data from <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Form</a>s\nand processes the returned response.</p>\n\n\n<p>Instances of this class are only created by a <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Form</a> when\n<a href=\"#!/api/Ext.form.BasicForm-method-submit\" rel=\"Ext.form.BasicForm-method-submit\" class=\"docClass\">submit</a>ting.</p>\n\n\n<p><u><b>Response Packet Criteria</b></u></p>\n\n\n<p>A response packet may contain:\n<div class=\"mdetail-params\"><ul>\n<li><b><code>success</code></b> property : Boolean\n<div class=\"sub-desc\">The <code>success</code> property is required.</div></li>\n<li><b><code>errors</code></b> property : Object\n<div class=\"sub-desc\"><div class=\"sub-desc\">The <code>errors</code> property,\nwhich is optional, contains error messages for invalid fields.</div></li>\n</ul></div>\n<p><u><b>JSON Packets</b></u></p>\n<p>By default, response packets are assumed to be JSON, so a typical response\npacket may look like this:</p>\n<pre><code>{\n success: false,\n errors: {\n clientCode: \"Client not found\",\n portOfLoading: \"This field must not be null\"\n }\n}</code></pre>\n<p>Other data may be placed into the response for processing by the <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Ext.form.BasicForm</a>'s callback\nor event handler methods. The object decoded from this JSON is available in the\n<a href=\"#!/api/Ext.form.Action-property-result\" rel=\"Ext.form.Action-property-result\" class=\"docClass\">result</a> property.</p>\n<p>Alternatively, if an <a href=\"#!/api/Ext.form.Action.Submit-cfg-errorReader\" rel=\"Ext.form.Action.Submit-cfg-errorReader\" class=\"docClass\">errorReader</a> is specified as an <a href=\"#!/api/Ext.data.XmlReader\" rel=\"Ext.data.XmlReader\" class=\"docClass\">XmlReader</a>:</p>\n<pre><code> errorReader: new <a href=\"#!/api/Ext.data.XmlReader\" rel=\"Ext.data.XmlReader\" class=\"docClass\">Ext.data.XmlReader</a>({\n record : 'field',\n success: '@success'\n }, [\n 'id', 'msg'\n ]\n )\n</code></pre>\n<p>then the results may be sent back in XML format:</p>\n<pre><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;message success=\"false\"&gt;\n&lt;errors&gt;\n &lt;field&gt;\n &lt;id&gt;clientCode&lt;/id&gt;\n &lt;msg&gt;&lt;![CDATA[Code not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;\n &lt;/field&gt;\n &lt;field&gt;\n &lt;id&gt;portOfLoading&lt;/id&gt;\n &lt;msg&gt;&lt;![CDATA[Port not found. &lt;br /&gt;&lt;i&gt;This is a test validation message from the server &lt;/i&gt;]]&gt;&lt;/msg&gt;\n &lt;/field&gt;\n&lt;/errors&gt;\n&lt;/message&gt;\n</code></pre>\n<p>Other elements may be placed into the response XML for processing by the <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Ext.form.BasicForm</a>'s callback\nor event handler methods. The XML document is available in the <a href=\"#!/api/Ext.form.Action.Submit-cfg-errorReader\" rel=\"Ext.form.Action.Submit-cfg-errorReader\" class=\"docCl