Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.form.action.Load.html
1 <!DOCTYPE html><html><head><title>Ext.form.action.Load | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.form.action.Load',
13         docClass: 'Ext.form.action.Load',
14         docReq: 'Ext.form.action.Load',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'Load.html#Ext-form.action.Load';
33     clsInfo = {"methods":["Load","callOverridden","getName"],"cfgs":["failure","form","headers","method","params","reset","scope","submitEmptyText","success","timeout","url","waitMsg","waitTitle"],"properties":["CLIENT_INVALID","CONNECT_FAILURE","LOAD_FAILURE","SERVER_INVALID","addStatics","borrow","create","createAlias","failureType","implement","override","response","result","run","type"],"events":[],"subclasses":["Ext.form.action.DirectLoad"]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Load.html#Ext-form.action.Load" target="_blank">Ext.form.action.Load</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.Base.html" rel="Ext.Base" class="cls docClass">Ext.Base</a><div class="subclass"><a href="Ext.form.action.Action.html" rel="Ext.form.action.Action" class="cls docClass">Ext.form.action.Action</a><div class="subclass"><strong>Ext.form.action.Load</strong></div></div></div></pre><p>A class which handles loading of data from a server into the Fields of an <a href="Ext.form.Basic.html" rel="Ext.form.Basic" class="docClass">Ext.form.Basic</a>.</p>
38
39
40 <p>Instances of this class are only created by a <a href="Ext.form.Basic.html" rel="Ext.form.Basic" class="docClass">Form</a> when
41 <a href="Ext.form.Basic.html#load" rel="Ext.form.Basic#load" class="docClass">load</a>ing.</p>
42
43
44 <p><u><b>Response Packet Criteria</b></u></p>
45
46
47 <p>A response packet <b>must</b> contain:
48 <div class="mdetail-params"><ul>
49 <li><b><code>success</code></b> property : Boolean</li>
50 <li><b><code>data</code></b> property : Object</li>
51 <div class="sub-desc">The <code>data</code> property contains the values of Fields to load.
52 The individual value object for each Field is passed to the Field's
53 <a href="Ext.form.field.Field.html#setValue" rel="Ext.form.field.Field#setValue" class="docClass">setValue</a> method.</div></li>
54 </ul></div>
55 <p><u><b>JSON Packets</b></u></p>
56 <p>By default, response packets are assumed to be JSON, so for the following form load call:
57 <pre class="prettyprint"><code>var myFormPanel = new Ext.form.Panel({
58     title: 'Client and routing info',
59     items: [{
60         fieldLabel: 'Client',
61         name: 'clientName'
62     }, {
63         fieldLabel: 'Port of loading',
64         name: 'portOfLoading'
65     }, {
66         fieldLabel: 'Port of discharge',
67         name: 'portOfDischarge'
68     }]
69 });
70 myFormPanel.<a href="Ext.form.Panel.html#getForm" rel="Ext.form.Panel#getForm" class="docClass">getForm</a>().<a href="Ext.form.Basic.html#load" rel="Ext.form.Basic#load" class="docClass">load</a>({
71     url: '/getRoutingInfo.php',
72     params: {
73         consignmentRef: myConsignmentRef
74     },
75     failure: function(form, action) {
76         Ext.Msg.alert("Load failed", action.result.errorMessage);
77     }
78 });
79 </code></pre>
80 a <b>success response</b> packet may look like this:</p>
81 <pre class="prettyprint"><code>{
82     success: true,
83     data: {
84         clientName: "Fred. Olsen Lines",
85         portOfLoading: "FXT",
86         portOfDischarge: "OSL"
87     }
88 }</code></pre>
89 while a <b>failure response</b> packet may look like this:</p>
90
91
92 <pre class="prettyprint"><code>{
93     success: false,
94     errorMessage: "Consignment reference not found"
95 }</code></pre>
96
97
98 <p>Other data may be placed into the response for processing the <a href="Ext.form.Basic.html" rel="Ext.form.Basic" class="docClass">Form</a>'s
99 callback or event handler methods. The object decoded from this JSON is available in the
100 <a href="Ext.form.action.Action.html#result" rel="Ext.form.action.Action#result" class="docClass">result</a> property.</p>
101
102 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-failure" class="member f inherited"><a href="Ext.form.action.Load.html#config-failure" rel="config-failure" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-failure" class="viewSource">view source</a></div><a name="failure"></a><a name="config-failure"></a><a href="Ext.form.action.Load.html#" rel="config-failure" class="cls expand">failure</a><span> : Function</span></div><div class="description"><div class="short">The function to call when a failure packet was received, or when an
103 error ocurred in the Ajax communication.
104 The func...</div><div class="long"><p>The function to call when a failure packet was received, or when an
105 error ocurred in the Ajax communication.
106 The function is passed the following parameters:<ul class="mdetail-params">
107 <li><b>form</b> : Ext.form.Basic<div class="sub-desc">The form that requested the action</div></li>
108 <li><b>action</b> : Ext.form.action.Action<div class="sub-desc">The Action class. If an Ajax
109 error ocurred, the failure type will be in <a href="Ext.form.action.Load.html#failureType" rel="Ext.form.action.Load#failureType" class="docClass">failureType</a>. The <a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>
110 property of this object may be examined to perform custom postprocessing.</div></li>
111 </ul></p>
112 </div></div></div><div id="config-form" class="member inherited"><a href="Ext.form.action.Load.html#config-form" rel="config-form" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-form" class="viewSource">view source</a></div><a name="form"></a><a name="config-form"></a><a href="Ext.form.action.Load.html#" rel="config-form" class="cls expand">form</a><span> : Ext.form.Basic</span></div><div class="description"><div class="short"><p>The <a href="Ext.form.Basic.html" rel="Ext.form.Basic" class="docClass">BasicForm</a> instance that
113 is invoking this Action. Required.</p>
114 </div><div class="long"><p>The <a href="Ext.form.Basic.html" rel="Ext.form.Basic" class="docClass">BasicForm</a> instance that
115 is invoking this Action. Required.</p>
116 </div></div></div><div id="config-headers" class="member inherited"><a href="Ext.form.action.Load.html#config-headers" rel="config-headers" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-headers" class="viewSource">view source</a></div><a name="headers"></a><a name="config-headers"></a><a href="Ext.form.action.Load.html#" rel="config-headers" class="cls expand">headers</a><span> : Object</span></div><div class="description"><div class="short"><p>Extra headers to be sent in the AJAX request for submit and load actions. See
117 <a href="Ext.data.Connection.html#headers" rel="Ext.data.Connection#headers" class="docClass">Ext.data.Connection.headers</a>.</p>
118
119 </div><div class="long"><p>Extra headers to be sent in the AJAX request for submit and load actions. See
120 <a href="Ext.data.Connection.html#headers" rel="Ext.data.Connection#headers" class="docClass">Ext.data.Connection.headers</a>.</p>
121
122 </div></div></div><div id="config-method" class="member inherited"><a href="Ext.form.action.Load.html#config-method" rel="config-method" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-method" class="viewSource">view source</a></div><a name="method"></a><a name="config-method"></a><a href="Ext.form.action.Load.html#" rel="config-method" class="cls expand">method</a><span> : String</span></div><div class="description"><div class="short"><p>The HTTP method to use to access the requested URL. Defaults to the
123 <a href="Ext.form.Basic.html#method" rel="Ext.form.Basic#method" class="docClass">BasicForm's method</a>, or 'POST' if not specified.</p>
124 </div><div class="long"><p>The HTTP method to use to access the requested URL. Defaults to the
125 <a href="Ext.form.Basic.html#method" rel="Ext.form.Basic#method" class="docClass">BasicForm's method</a>, or 'POST' if not specified.</p>
126 </div></div></div><div id="config-params" class="member inherited"><a href="Ext.form.action.Load.html#config-params" rel="config-params" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-params" class="viewSource">view source</a></div><a name="params"></a><a name="config-params"></a><a href="Ext.form.action.Load.html#" rel="config-params" class="cls expand">params</a><span> : Object/String</span></div><div class="description"><div class="short">Extra parameter values to pass. These are added to the Form's
127 Ext.form.Basic.baseParams and passed to the specified U...</div><div class="long"><p>Extra parameter values to pass. These are added to the Form's
128 <a href="Ext.form.Basic.html#baseParams" rel="Ext.form.Basic#baseParams" class="docClass">Ext.form.Basic.baseParams</a> and passed to the specified URL along with the Form's
129 input fields.</p>
130
131
132 <p>Parameters are encoded as standard HTTP parameters using <a href="Ext.html#urlEncode" rel="Ext#urlEncode" class="docClass">Ext.Object.toQueryString</a>.</p>
133
134 </div></div></div><div id="config-reset" class="member inherited"><a href="Ext.form.action.Load.html#config-reset" rel="config-reset" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-reset" class="viewSource">view source</a></div><a name="reset"></a><a name="config-reset"></a><a href="Ext.form.action.Load.html#" rel="config-reset" class="cls expand">reset</a><span> : Boolean</span></div><div class="description"><div class="short">When set to true, causes the Form to be
135 reset on Action success. If specified, this happens
136 before the success callba...</div><div class="long"><p>When set to <tt><b>true</b></tt>, causes the Form to be
137 <a href="Ext.form.Basic.html#reset" rel="Ext.form.Basic#reset" class="docClass">reset</a> on Action success. If specified, this happens
138 before the <a href="Ext.form.action.Load.html#success" rel="Ext.form.action.Load#success" class="docClass">success</a> callback is called and before the Form's
139 <a href="Ext.form.Basic.html#actioncomplete" rel="Ext.form.Basic#actioncomplete" class="docClass">actioncomplete</a> event fires.</p>
140 </div></div></div><div id="config-scope" class="member inherited"><a href="Ext.form.action.Load.html#config-scope" rel="config-scope" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-scope" class="viewSource">view source</a></div><a name="scope"></a><a name="config-scope"></a><a href="Ext.form.action.Load.html#" rel="config-scope" class="cls expand">scope</a><span> : Object</span></div><div class="description"><div class="short">The scope in which to call the configured success and failure
141 callback functions (the this reference for the callback...</div><div class="long"><p>The scope in which to call the configured <tt>success</tt> and <tt>failure</tt>
142 callback functions (the <tt>this</tt> reference for the callback functions).</p>
143 </div></div></div><div id="config-submitEmptyText" class="member inherited"><a href="Ext.form.action.Load.html#config-submitEmptyText" rel="config-submitEmptyText" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-submitEmptyText" class="viewSource">view source</a></div><a name="submitEmptyText"></a><a name="config-submitEmptyText"></a><a href="Ext.form.action.Load.html#" rel="config-submitEmptyText" class="cls expand">submitEmptyText</a><span> : Boolean</span></div><div class="description"><div class="short"><p>If set to <tt>true</tt>, the emptyText value will be sent with the form
144 when it is submitted. Defaults to <tt>true</tt>.</p>
145 </div><div class="long"><p>If set to <tt>true</tt>, the emptyText value will be sent with the form
146 when it is submitted. Defaults to <tt>true</tt>.</p>
147 </div></div></div><div id="config-success" class="member inherited"><a href="Ext.form.action.Load.html#config-success" rel="config-success" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-success" class="viewSource">view source</a></div><a name="success"></a><a name="config-success"></a><a href="Ext.form.action.Load.html#" rel="config-success" class="cls expand">success</a><span> : Function</span></div><div class="description"><div class="short">The function to call when a valid success return packet is received.
148 The function is passed the following parameters:...</div><div class="long"><p>The function to call when a valid success return packet is received.
149 The function is passed the following parameters:<ul class="mdetail-params">
150 <li><b>form</b> : Ext.form.Basic<div class="sub-desc">The form that requested the action</div></li>
151 <li><b>action</b> : Ext.form.action.Action<div class="sub-desc">The Action class. The <a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>
152 property of this object may be examined to perform custom postprocessing.</div></li>
153 </ul></p>
154 </div></div></div><div id="config-timeout" class="member inherited"><a href="Ext.form.action.Load.html#config-timeout" rel="config-timeout" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-timeout" class="viewSource">view source</a></div><a name="timeout"></a><a name="config-timeout"></a><a href="Ext.form.action.Load.html#" rel="config-timeout" class="cls expand">timeout</a><span> : Number</span></div><div class="description"><div class="short">The number of seconds to wait for a server response before
155 failing with the failureType as Ext.form.action.Action.CON...</div><div class="long"><p>The number of seconds to wait for a server response before
156 failing with the <a href="Ext.form.action.Load.html#failureType" rel="Ext.form.action.Load#failureType" class="docClass">failureType</a> as <a href="Ext.form.action.Action.html#CONNECT_FAILURE" rel="Ext.form.action.Action#CONNECT_FAILURE" class="docClass">Ext.form.action.Action.CONNECT_FAILURE</a>. If not specified,
157 defaults to the configured <tt><a href="Ext.form.Basic.html#timeout" rel="Ext.form.Basic#timeout" class="docClass">timeout</a></tt> of the
158 <a href="Ext.form.action.Load.html#form" rel="Ext.form.action.Load#form" class="docClass">form</a>.</p>
159 </div></div></div><div id="config-url" class="member inherited"><a href="Ext.form.action.Load.html#config-url" rel="config-url" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-url" class="viewSource">view source</a></div><a name="url"></a><a name="config-url"></a><a href="Ext.form.action.Load.html#" rel="config-url" class="cls expand">url</a><span> : String</span></div><div class="description"><div class="short"><p>The URL that the Action is to invoke. Will default to the <a href="Ext.form.Basic.html#url" rel="Ext.form.Basic#url" class="docClass">url</a>
160 configured on the <a href="Ext.form.action.Load.html#form" rel="Ext.form.action.Load#form" class="docClass">form</a>.</p>
161 </div><div class="long"><p>The URL that the Action is to invoke. Will default to the <a href="Ext.form.Basic.html#url" rel="Ext.form.Basic#url" class="docClass">url</a>
162 configured on the <a href="Ext.form.action.Load.html#form" rel="Ext.form.action.Load#form" class="docClass">form</a>.</p>
163 </div></div></div><div id="config-waitMsg" class="member inherited"><a href="Ext.form.action.Load.html#config-waitMsg" rel="config-waitMsg" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-waitMsg" class="viewSource">view source</a></div><a name="waitMsg"></a><a name="config-waitMsg"></a><a href="Ext.form.action.Load.html#" rel="config-waitMsg" class="cls expand">waitMsg</a><span> : String</span></div><div class="description"><div class="short"><p>The message to be displayed by a call to <a href="Ext.window.MessageBox.html#wait" rel="Ext.window.MessageBox#wait" class="docClass">Ext.window.MessageBox.wait</a>
164 during the time the action is being processed.</p>
165 </div><div class="long"><p>The message to be displayed by a call to <a href="Ext.window.MessageBox.html#wait" rel="Ext.window.MessageBox#wait" class="docClass">Ext.window.MessageBox.wait</a>
166 during the time the action is being processed.</p>
167 </div></div></div><div id="config-waitTitle" class="member inherited"><a href="Ext.form.action.Load.html#config-waitTitle" rel="config-waitTitle" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-cfg-waitTitle" class="viewSource">view source</a></div><a name="waitTitle"></a><a name="config-waitTitle"></a><a href="Ext.form.action.Load.html#" rel="config-waitTitle" class="cls expand">waitTitle</a><span> : String</span></div><div class="description"><div class="short"><p>The title to be displayed by a call to <a href="Ext.window.MessageBox.html#wait" rel="Ext.window.MessageBox#wait" class="docClass">Ext.window.MessageBox.wait</a>
168 during the time the action is being processed.</p>
169 </div><div class="long"><p>The title to be displayed by a call to <a href="Ext.window.MessageBox.html#wait" rel="Ext.window.MessageBox#wait" class="docClass">Ext.window.MessageBox.wait</a>
170 during the time the action is being processed.</p>
171 </div></div></div></div><div class="m-properties"><a name="properties"></a><div class="definedBy">Defined By</div><h3 class="prp p">Properties</h3><div id="property-CLIENT_INVALID" class="member f inherited"><a href="Ext.form.action.Load.html#property-CLIENT_INVALID" rel="property-CLIENT_INVALID" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-CLIENT_INVALID" class="viewSource">view source</a></div><a name="CLIENT_INVALID"></a><a name="property-CLIENT_INVALID"></a><a href="Ext.form.action.Load.html#" rel="property-CLIENT_INVALID" class="cls expand">CLIENT_INVALID</a><span> : String</span></div><div class="description"><div class="short">Failure type returned when client side validation of the Form fails
172 thus aborting a submit action. Client side valida...</div><div class="long"><p>Failure type returned when client side validation of the Form fails
173 thus aborting a submit action. Client side validation is performed unless
174 <a href="Ext.form.action.Submit.html#clientValidation" rel="Ext.form.action.Submit#clientValidation" class="docClass">Ext.form.action.Submit.clientValidation</a> is explicitly set to <tt>false</tt>.</p>
175 </div></div></div><div id="property-CONNECT_FAILURE" class="member inherited"><a href="Ext.form.action.Load.html#property-CONNECT_FAILURE" rel="property-CONNECT_FAILURE" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-CONNECT_FAILURE" class="viewSource">view source</a></div><a name="CONNECT_FAILURE"></a><a name="property-CONNECT_FAILURE"></a><a href="Ext.form.action.Load.html#" rel="property-CONNECT_FAILURE" class="cls expand">CONNECT_FAILURE</a><span> : String</span></div><div class="description"><div class="short">Failure type returned when a communication error happens when attempting
176 to send a request to the remote server. The ...</div><div class="long"><p>Failure type returned when a communication error happens when attempting
177 to send a request to the remote server. The <a href="Ext.form.action.Load.html#response" rel="Ext.form.action.Load#response" class="docClass">response</a> may be examined to
178 provide further information.</p>
179 </div></div></div><div id="property-LOAD_FAILURE" class="member inherited"><a href="Ext.form.action.Load.html#property-LOAD_FAILURE" rel="property-LOAD_FAILURE" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-LOAD_FAILURE" class="viewSource">view source</a></div><a name="LOAD_FAILURE"></a><a name="property-LOAD_FAILURE"></a><a href="Ext.form.action.Load.html#" rel="property-LOAD_FAILURE" class="cls expand">LOAD_FAILURE</a><span> : String</span></div><div class="description"><div class="short">Failure type returned when the response's success
180 property is set to false, or no field values are returned in the re...</div><div class="long"><p>Failure type returned when the response's <tt>success</tt>
181 property is set to <tt>false</tt>, or no field values are returned in the response's
182 <tt>data</tt> property.</p>
183 </div></div></div><div id="property-SERVER_INVALID" class="member inherited"><a href="Ext.form.action.Load.html#property-SERVER_INVALID" rel="property-SERVER_INVALID" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-SERVER_INVALID" class="viewSource">view source</a></div><a name="SERVER_INVALID"></a><a name="property-SERVER_INVALID"></a><a href="Ext.form.action.Load.html#" rel="property-SERVER_INVALID" class="cls expand">SERVER_INVALID</a><span> : String</span></div><div class="description"><div class="short">Failure type returned when server side processing fails and the result's
184 success property is set to false.
185
186
187 In the c...</div><div class="long"><p>Failure type returned when server side processing fails and the <a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>'s
188 <tt>success</tt> property is set to <tt>false</tt>.</p>
189
190
191 <p>In the case of a form submission, field-specific error messages may be returned in the
192 <a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>'s <tt>errors</tt> property.</p>
193
194 </div></div></div><div id="property-addStatics" class="member inherited"><a href="Ext.form.action.Load.html#property-addStatics" rel="property-addStatics" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-addStatics" class="viewSource">view source</a></div><a name="addStatics"></a><a name="property-addStatics"></a><a href="Ext.form.action.Load.html#" rel="property-addStatics" class="cls expand">addStatics</a><span> : Function</span></div><div class="description"><div class="short">Add / override static properties of this class.
195
196 Ext.define('My.cool.Class', {
197     ...
198 });
199
200 My.cool.Class.addStatics(...</div><div class="long"><p>Add / override static properties of this class.</p>
201
202 <pre><code>Ext.define('My.cool.Class', {
203     ...
204 });
205
206 My.cool.Class.addStatics({
207     someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'
208     method1: function() { ... },    // My.cool.Class.method1 = function() { ... };
209     method2: function() { ... }     // My.cool.Class.method2 = function() { ... };
210 });
211 </code></pre>
212 </div></div></div><div id="property-borrow" class="member inherited"><a href="Ext.form.action.Load.html#property-borrow" rel="property-borrow" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-borrow" class="viewSource">view source</a></div><a name="borrow"></a><a name="property-borrow"></a><a href="Ext.form.action.Load.html#" rel="property-borrow" class="cls expand">borrow</a><span> : Function</span></div><div class="description"><div class="short">Borrow another class' members to the prototype of this class.
213
214 Ext.define('Bank', {
215
216 money: '$$$',
217 printMoney: functi...</div><div class="long"><p>Borrow another class' members to the prototype of this class.</p>
218
219 <p>Ext.define('Bank', {</p>
220
221 <pre><code>money: '$$$',
222 printMoney: function() {
223     alert('$$$$$$$');
224 }
225 </code></pre>
226
227 <p>});</p>
228
229 <p>Ext.define('Thief', {</p>
230
231 <pre><code>...
232 </code></pre>
233
234 <p>});</p>
235
236 <p>Thief.borrow(Bank, ['money', 'printMoney']);</p>
237
238 <p>var steve = new Thief();</p>
239
240 <p>alert(steve.money); // alerts '$$$'
241 steve.printMoney(); // alerts '$$$$$$$'</p>
242 </div></div></div><div id="property-create" class="member inherited"><a href="Ext.form.action.Load.html#property-create" rel="property-create" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-create" class="viewSource">view source</a></div><a name="create"></a><a name="property-create"></a><a href="Ext.form.action.Load.html#" rel="property-create" class="cls expand">create</a><span> : Function</span></div><div class="description"><div class="short">Create a new instance of this Class.
243 Ext.define('My.cool.Class', {
244
245 ...
246
247
248 });
249
250 My.cool.Class.create({
251
252 someConfig: tr...</div><div class="long"><p>Create a new instance of this Class.
253 Ext.define('My.cool.Class', {</p>
254
255 <pre><code>...
256 </code></pre>
257
258 <p>});</p>
259
260 <p>My.cool.Class.create({</p>
261
262 <pre><code>someConfig: true
263 </code></pre>
264
265 <p>});</p>
266 </div></div></div><div id="property-createAlias" class="member inherited"><a href="Ext.form.action.Load.html#property-createAlias" rel="property-createAlias" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-createAlias" class="viewSource">view source</a></div><a name="createAlias"></a><a name="property-createAlias"></a><a href="Ext.form.action.Load.html#" rel="property-createAlias" class="cls expand">createAlias</a><span> : Function</span></div><div class="description"><div class="short">Create aliases for existing prototype methods. Example:
267
268 Ext.define('My.cool.Class', {
269     method1: function() { ... ...</div><div class="long"><p>Create aliases for existing prototype methods. Example:</p>
270
271 <pre><code>Ext.define('My.cool.Class', {
272     method1: function() { ... },
273     method2: function() { ... }
274 });
275
276 var test = new My.cool.Class();
277
278 My.cool.Class.createAlias({
279     method3: 'method1',
280     method4: 'method2'
281 });
282
283 test.method3(); // test.method1()
284
285 My.cool.Class.createAlias('method5', 'method3');
286
287 test.method5(); // test.method3() -&gt; test.method1()
288 </code></pre>
289 </div></div></div><div id="property-failureType" class="member inherited"><a href="Ext.form.action.Load.html#property-failureType" rel="property-failureType" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-failureType" class="viewSource">view source</a></div><a name="failureType"></a><a name="property-failureType"></a><a href="Ext.form.action.Load.html#" rel="property-failureType" class="cls expand">failureType</a><span> : String</span></div><div class="description"><div class="short">The type of failure detected will be one of these: Ext.form.action.Action.CLIENT_INVALID,
290 Ext.form.action.Action.SERV...</div><div class="long"><p>The type of failure detected will be one of these: <a href="Ext.form.action.Action.html#CLIENT_INVALID" rel="Ext.form.action.Action#CLIENT_INVALID" class="docClass">Ext.form.action.Action.CLIENT_INVALID</a>,
291 <a href="Ext.form.action.Action.html#SERVER_INVALID" rel="Ext.form.action.Action#SERVER_INVALID" class="docClass">Ext.form.action.Action.SERVER_INVALID</a>, <a href="Ext.form.action.Action.html#CONNECT_FAILURE" rel="Ext.form.action.Action#CONNECT_FAILURE" class="docClass">Ext.form.action.Action.CONNECT_FAILURE</a>, or
292 <a href="Ext.form.action.Action.html#LOAD_FAILURE" rel="Ext.form.action.Action#LOAD_FAILURE" class="docClass">Ext.form.action.Action.LOAD_FAILURE</a>.  Usage:</p>
293
294 <pre><code>var fp = new Ext.form.Panel({
295 ...
296 buttons: [{
297     text: 'Save',
298     formBind: true,
299     handler: function(){
300         if(fp.getForm().isValid()){
301             fp.getForm().submit({
302                 url: 'form-submit.php',
303                 waitMsg: 'Submitting your data...',
304                 success: function(form, action){
305                     // server responded with success = true
306                     var result = action.<a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>;
307                 },
308                 failure: function(form, action){
309                     if (action.<a href="Ext.form.action.Load.html#failureType" rel="Ext.form.action.Load#failureType" class="docClass">failureType</a> === <a href="Ext.form.action.Action.html#CONNECT_FAILURE" rel="Ext.form.action.Action#CONNECT_FAILURE" class="docClass">Ext.form.action.Action.CONNECT_FAILURE</a>) {
310                         Ext.Msg.alert('Error',
311                             'Status:'+action.<a href="Ext.form.action.Load.html#response" rel="Ext.form.action.Load#response" class="docClass">response</a>.status+': '+
312                             action.<a href="Ext.form.action.Load.html#response" rel="Ext.form.action.Load#response" class="docClass">response</a>.statusText);
313                     }
314                     if (action.failureType === <a href="Ext.form.action.Action.html#SERVER_INVALID" rel="Ext.form.action.Action#SERVER_INVALID" class="docClass">Ext.form.action.Action.SERVER_INVALID</a>){
315                         // server responded with success = false
316                         Ext.Msg.alert('Invalid', action.<a href="Ext.form.action.Load.html#result" rel="Ext.form.action.Load#result" class="docClass">result</a>.errormsg);
317                     }
318                 }
319             });
320         }
321     }
322 },{
323     text: 'Reset',
324     handler: function(){
325         fp.getForm().reset();
326     }
327 }]
328 </code></pre>
329
330 </div></div></div><div id="property-implement" class="member inherited"><a href="Ext.form.action.Load.html#property-implement" rel="property-implement" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-implement" class="viewSource">view source</a></div><a name="implement"></a><a name="property-implement"></a><a href="Ext.form.action.Load.html#" rel="property-implement" class="cls expand">implement</a><span> : Function</span></div><div class="description"><div class="short">Add methods / properties to the prototype of this class.
331
332 Ext.define('My.awesome.Cat', {
333     constructor: function() ...</div><div class="long"><p>Add methods / properties to the prototype of this class.</p>
334
335 <pre><code>Ext.define('My.awesome.Cat', {
336     constructor: function() {
337         ...
338     }
339 });
340
341  My.awesome.Cat.implement({
342      meow: function() {
343         alert('Meowww...');
344      }
345  });
346
347  var kitty = new My.awesome.Cat;
348  kitty.meow();
349 </code></pre>
350 </div></div></div><div id="property-override" class="member inherited"><a href="Ext.form.action.Load.html#property-override" rel="property-override" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-property-override" class="viewSource">view source</a></div><a name="override"></a><a name="property-override"></a><a href="Ext.form.action.Load.html#" rel="property-override" class="cls expand">override</a><span> : Function</span></div><div class="description"><div class="short">Override prototype members of this class. Overridden methods can be invoked via
351 Ext.Base.callOverridden
352
353 Ext.define('...</div><div class="long"><p>Override prototype members of this class. Overridden methods can be invoked via
354 <a href="Ext.Base.html#callOverridden" rel="Ext.Base#callOverridden" class="docClass">Ext.Base.callOverridden</a></p>
355
356 <pre><code>Ext.define('My.Cat', {
357     constructor: function() {
358         alert("I'm a cat!");
359
360         return this;
361     }
362 });
363
364 My.Cat.override({
365     constructor: function() {
366         alert("I'm going to be a cat!");
367
368         var instance = this.callOverridden();
369
370         alert("Meeeeoooowwww");
371
372         return instance;
373     }
374 });
375
376 var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
377                           // alerts "I'm a cat!"
378                           // alerts "Meeeeoooowwww"
379 </code></pre>
380 </div></div></div><div id="property-response" class="member inherited"><a href="Ext.form.action.Load.html#property-response" rel="property-response" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-response" class="viewSource">view source</a></div><a name="response"></a><a name="property-response"></a><a href="Ext.form.action.Load.html#" rel="property-response" class="cls expand">response</a><span> : Object</span></div><div class="description"><div class="short"><p>The raw XMLHttpRequest object used to perform the action.</p>
381 </div><div class="long"><p>The raw XMLHttpRequest object used to perform the action.</p>
382 </div></div></div><div id="property-result" class="member inherited"><a href="Ext.form.action.Load.html#property-result" rel="property-result" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-result" class="viewSource">view source</a></div><a name="result"></a><a name="property-result"></a><a href="Ext.form.action.Load.html#" rel="property-result" class="cls expand">result</a><span> : Object</span></div><div class="description"><div class="short"><p>The decoded response object containing a boolean <tt>success</tt> property and
383 other, action-specific properties.</p>
384 </div><div class="long"><p>The decoded response object containing a boolean <tt>success</tt> property and
385 other, action-specific properties.</p>
386 </div></div></div><div id="property-run" class="member inherited"><a href="Ext.form.action.Load.html#property-run" rel="property-run" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-run" class="viewSource">view source</a></div><a name="run"></a><a name="property-run"></a><a href="Ext.form.action.Load.html#" rel="property-run" class="cls expand">run</a><span> : Object</span></div><div class="description"><div class="short"><p>Invokes this action using the current configuration.</p>
387 </div><div class="long"><p>Invokes this action using the current configuration.</p>
388 </div></div></div><div id="property-type" class="member inherited"><a href="Ext.form.action.Load.html#property-type" rel="property-type" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-property-type" class="viewSource">view source</a></div><a name="type"></a><a name="property-type"></a><a href="Ext.form.action.Load.html#" rel="property-type" class="cls expand">type</a><span> : String</span></div><div class="description"><div class="short"><p>The type of action this Action instance performs.
389 Currently only "submit" and "load" are supported.</p>
390 </div><div class="long"><p>The type of action this Action instance performs.
391 Currently only "submit" and "load" are supported.</p>
392 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Load" class="member f inherited"><a href="Ext.form.action.Load.html#method-Load" rel="method-Load" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.form.action.Action.html" class="definedIn docClass">Ext.form.action.Action</a><br/><a href="../source/Action2.html#Ext-form.action.Action-method-constructor" class="viewSource">view source</a></div><a name="Load"></a><a name="method-Load"></a><a href="Ext.form.action.Load.html#" rel="method-Load" class="cls expand">Load</a>(
393 <span class="pre">Object config</span>)
394  : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
395 <h3 class="pa">Parameters</h3><ul><li><span class="pre">config</span> : Object<div class="sub-desc"><p>The configuration for this instance.</p>
396 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
397 </li></ul></div></div></div><div id="method-callOverridden" class="member inherited"><a href="Ext.form.action.Load.html#method-callOverridden" rel="method-callOverridden" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-method-callOverridden" class="viewSource">view source</a></div><a name="callOverridden"></a><a name="method-callOverridden"></a><a href="Ext.form.action.Load.html#" rel="method-callOverridden" class="cls expand">callOverridden</a>(
398 <span class="pre">Array/Arguments args</span>)
399  : Mixed</div><div class="description"><div class="short">Call the original method that was previously overridden with Ext.Base.override
400
401 Ext.define('My.Cat', {
402     constructo...</div><div class="long"><p>Call the original method that was previously overridden with <a href="Ext.Base.html#override" rel="Ext.Base#override" class="docClass">Ext.Base.override</a></p>
403
404 <pre><code>Ext.define('My.Cat', {
405     constructor: function() {
406         alert("I'm a cat!");
407
408         return this;
409     }
410 });
411
412 My.Cat.override({
413     constructor: function() {
414         alert("I'm going to be a cat!");
415
416         var instance = this.callOverridden();
417
418         alert("Meeeeoooowwww");
419
420         return instance;
421     }
422 });
423
424 var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
425                           // alerts "I'm a cat!"
426                           // alerts "Meeeeoooowwww"
427 </code></pre>
428 <h3 class="pa">Parameters</h3><ul><li><span class="pre">args</span> : Array/Arguments<div class="sub-desc"><p>The arguments, either an array or the <code>arguments</code> object</p>
429 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed</span>&nbsp; &nbsp;<p>Returns the result after calling the overridden method</p>
430 </li></ul></div></div></div><div id="method-getName" class="member inherited"><a href="Ext.form.action.Load.html#method-getName" rel="method-getName" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.Base.html" class="definedIn docClass">Ext.Base</a><br/><a href="../source/Base3.html#Ext-Base-method-getName" class="viewSource">view source</a></div><a name="getName"></a><a name="method-getName"></a><a href="Ext.form.action.Load.html#" rel="method-getName" class="cls expand">getName</a> : String</div><div class="description"><div class="short">Get the current class' name in string format.
431
432 Ext.define('My.cool.Class', {
433     constructor: function() {
434         al...</div><div class="long"><p>Get the current class' name in string format.</p>
435
436 <pre><code>Ext.define('My.cool.Class', {
437     constructor: function() {
438         alert(this.self.getName()); // alerts 'My.cool.Class'
439     }
440 });
441
442 My.cool.Class.getName(); // 'My.cool.Class'
443 </code></pre>
444 <h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>className</p>
445 </li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>