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
24 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_Load({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.form.Action.DirectLoad"],"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.Load</strong></div></div><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Ext.form.Action.DirectLoad' rel='Ext.form.Action.DirectLoad' class='docClass'>Ext.form.Action.DirectLoad</a></div><h4>Files</h4><div class='dependency'><a href='source/Action2.html#Ext-form-Action-Load' target='_blank'>Action.js</a></div></pre><div class='doc-contents'><p>A class which handles loading of data from a server into the Fields of an <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Ext.form.BasicForm</a>.</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-load\" rel=\"Ext.form.BasicForm-method-load\" class=\"docClass\">load</a>ing.</p>\n\n\n<p><u><b>Response Packet Criteria</b></u></p>\n\n\n<p>A response packet <b>must</b> contain:\n<div class=\"mdetail-params\"><ul>\n<li><b><code>success</code></b> property : Boolean</li>\n<li><b><code>data</code></b> property : Object</li>\n<div class=\"sub-desc\">The <code>data</code> property contains the values of Fields to load.\nThe individual value object for each Field is passed to the Field's\n<a href=\"#!/api/Ext.form.Field-method-setValue\" rel=\"Ext.form.Field-method-setValue\" class=\"docClass\">setValue</a> method.</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 for the following form load call:\n<pre><code>var myFormPanel = new <a href=\"#!/api/Ext.form.FormPanel\" rel=\"Ext.form.FormPanel\" class=\"docClass\">Ext.form.FormPanel</a>({\n title: 'Client and routing info',\n items: [{\n fieldLabel: 'Client',\n name: 'clientName'\n }, {\n fieldLabel: 'Port of loading',\n name: 'portOfLoading'\n }, {\n fieldLabel: 'Port of discharge',\n name: 'portOfDischarge'\n }]\n});\nmyFormPanel.<a href=\"#!/api/Ext.form.FormPanel-method-getForm\" rel=\"Ext.form.FormPanel-method-getForm\" class=\"docClass\">getForm</a>().<a href=\"#!/api/Ext.form.BasicForm-method-load\" rel=\"Ext.form.BasicForm-method-load\" class=\"docClass\">load</a>({\n url: '/getRoutingInfo.php',\n params: {\n consignmentRef: myConsignmentRef\n },\n failure: function(form, action) {\n Ext.Msg.alert(\"Load failed\", action.result.errorMessage);\n }\n});\n</code></pre>\na <b>success response</b> packet may look like this:</p>\n<pre><code>{\n success: true,\n data: {\n clientName: \"Fred. Olsen Lines\",\n portOfLoading: \"FXT\",\n portOfDischarge: \"OSL\"\n }\n}</code></pre>\nwhile a <b>failure response</b> packet may look like this:</p>\n\n\n<pre><code>{\n success: false,\n errorMessage: \"Consignment reference not found\"\n}</code></pre>\n\n\n<p>Other data may be placed into the response for processing the <a href=\"#!/api/Ext.form.BasicForm\" rel=\"Ext.form.BasicForm\" class=\"docClass\">Form</a>'s\ncallback or 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\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-failure' class='member first-child inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Ext.form.Action' rel='Ext.form.Action' class='defined-in docClass'>Ext.