2 |
aperonnet |
1 |
<div class="body-wrap">
|
|
|
2 |
<div class="top-tools">
|
|
|
3 |
<a class="inner-link" href="#Ext.form.Action.Load-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
|
|
|
4 |
<a class="inner-link" href="#Ext.form.Action.Load-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
|
|
|
5 |
<a class="inner-link" href="#Ext.form.Action.Load-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
|
|
|
6 |
<a class="inner-link" href="#Ext.form.Action.Load-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
|
|
|
7 |
<a class="bookmark" href="../docs/?class=Ext.form.Action.Load"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
|
|
|
8 |
</div>
|
|
|
9 |
<div class="inheritance res-block">
|
|
|
10 |
<pre class="res-block-inner"><a ext:cls="Ext.form.Action" ext:member="" href="output/Ext.form.Action.html">Action</a>
|
|
|
11 |
<img src="resources/elbow-end.gif"/>Action.Load</pre></div>
|
|
|
12 |
<h1>Class Ext.form.Action.Load</h1>
|
|
|
13 |
<table cellspacing="0">
|
|
|
14 |
<tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
|
|
|
15 |
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/widgets/form/Action.js" target="_blank">Action.js</a></td></tr>
|
|
|
16 |
<tr><td class="label">Class:</td><td class="hd-info">Action.Load</td></tr>
|
|
|
17 |
<tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.form.Action" ext:member="" href="output/Ext.form.Action.html">Action</a></td></tr>
|
|
|
18 |
</table>
|
|
|
19 |
<div class="description">
|
|
|
20 |
A class which handles loading of data from a server into the Fields of
|
|
|
21 |
an <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>.
|
|
|
22 |
<br><br>
|
|
|
23 |
Instances of this class are only created by a <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a> when
|
|
|
24 |
submitting.
|
|
|
25 |
<br><br>
|
|
|
26 |
A response packet <b>must</b> contain a boolean <tt style="font-weight:bold">success</tt> property, and
|
|
|
27 |
a <tt style="font-weight:bold">data</tt> property. The <tt style="font-weight:bold">data</tt> property contains the
|
|
|
28 |
values of Fields to load. The individual value object for each Field
|
|
|
29 |
is passed to the Field's <a ext:cls="Ext.form.Field" ext:member="setValue" href="output/Ext.form.Field.html#setValue">setValue</a> method.
|
|
|
30 |
<br><br>
|
|
|
31 |
By default, response packets are assumed to be JSON, so a typical response
|
|
|
32 |
packet may look like this:
|
|
|
33 |
<br><br><pre><code>{
|
|
|
34 |
success: true,
|
|
|
35 |
data: {
|
|
|
36 |
clientName: <em>"Fred. Olsen Lines"</em>,
|
|
|
37 |
portOfLoading: <em>"FXT"</em>,
|
|
|
38 |
portOfDischarge: <em>"OSL"</em>
|
|
|
39 |
}
|
|
|
40 |
}</code></pre>
|
|
|
41 |
<br><br>
|
|
|
42 |
Other data may be placed into the response for processing the the <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a>'s callback
|
|
|
43 |
or event handler methods. The object decoded from this JSON is available in the <a ext:cls="Ext.form.Action.Load" ext:member="result" href="output/Ext.form.Action.Load.html#result">result</a> property. </div>
|
|
|
44 |
|
|
|
45 |
<div class="hr"></div>
|
|
|
46 |
<a id="Ext.form.Action.Load-configs"></a>
|
|
|
47 |
<h2>Config Options</h2>
|
|
|
48 |
<table cellspacing="0" class="member-table">
|
|
|
49 |
<tr>
|
|
|
50 |
<th class="sig-header" colspan="2">Config Options</th>
|
|
|
51 |
<th class="msource-header">Defined By</th>
|
|
|
52 |
</tr>
|
|
|
53 |
<tr class="config-row inherited expandable">
|
|
|
54 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
55 |
<td class="sig">
|
|
|
56 |
<a id="Ext.form.Action.Load-failure"></a>
|
|
|
57 |
<b>failure</b> : Function <div class="mdesc">
|
|
|
58 |
<div class="short">The function to call when a failure packet was recieved, or when an error ocurred in the Ajax communication. The func...</div>
|
|
|
59 |
<div class="long">
|
|
|
60 |
The function to call when a failure packet was recieved, or when an error ocurred in the Ajax communication. The function is passed the following parameters:<ul class="mdetail-params"> <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li> <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajax error ocurred, the failure type will be in <a ext:cls="Ext.form.Action" ext:member="failureType" href="output/Ext.form.Action.html#failureType">failureType</a>. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a> property of this object may be examined to perform custom postprocessing.</div></li> </ul> </div>
|
|
|
61 |
</div>
|
|
|
62 |
</td>
|
|
|
63 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#failure" href="output/Ext.form.Action.html#failure">Action</a></td>
|
|
|
64 |
</tr>
|
|
|
65 |
<tr class="config-row inherited alt expandable">
|
|
|
66 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
67 |
<td class="sig">
|
|
|
68 |
<a id="Ext.form.Action.Load-method"></a>
|
|
|
69 |
<b>method</b> : String <div class="mdesc">
|
|
|
70 |
<div class="short">The HTTP method to use to access the requested URL. Defaults to the Ext.form.BasicForm's method, or if that is not sp...</div>
|
|
|
71 |
<div class="long">
|
|
|
72 |
The HTTP method to use to access the requested URL. Defaults to the <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>'s method, or if that is not specified, the underlying DOM form's method. </div>
|
|
|
73 |
</div>
|
|
|
74 |
</td>
|
|
|
75 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#method" href="output/Ext.form.Action.html#method">Action</a></td>
|
|
|
76 |
</tr>
|
|
|
77 |
<tr class="config-row inherited expandable">
|
|
|
78 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
79 |
<td class="sig">
|
|
|
80 |
<a id="Ext.form.Action.Load-params"></a>
|
|
|
81 |
<b>params</b> : Mixed <div class="mdesc">
|
|
|
82 |
<div class="short">Extra parameter values to pass. These are added to the Form's Ext.form.BasicForm.baseParams and passed to the specifi...</div>
|
|
|
83 |
<div class="long">
|
|
|
84 |
Extra parameter values to pass. These are added to the Form's <a ext:cls="Ext.form.BasicForm" ext:member="baseParams" href="output/Ext.form.BasicForm.html#baseParams">Ext.form.BasicForm.baseParams</a> and passed to the specified URL along with the Form's input fields. </div>
|
|
|
85 |
</div>
|
|
|
86 |
</td>
|
|
|
87 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#params" href="output/Ext.form.Action.html#params">Action</a></td>
|
|
|
88 |
</tr>
|
|
|
89 |
<tr class="config-row inherited alt">
|
|
|
90 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
91 |
<td class="sig">
|
|
|
92 |
<a id="Ext.form.Action.Load-scope"></a>
|
|
|
93 |
<b>scope</b> : Object <div class="mdesc">
|
|
|
94 |
The scope in which to call the callback functions (The <tt>this</tt> reference for the callback functions). </div>
|
|
|
95 |
</td>
|
|
|
96 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#scope" href="output/Ext.form.Action.html#scope">Action</a></td>
|
|
|
97 |
</tr>
|
|
|
98 |
<tr class="config-row inherited expandable">
|
|
|
99 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
100 |
<td class="sig">
|
|
|
101 |
<a id="Ext.form.Action.Load-success"></a>
|
|
|
102 |
<b>success</b> : Function <div class="mdesc">
|
|
|
103 |
<div class="short">The function to call when a valid success return packet is recieved. The function is passed the following parameters:...</div>
|
|
|
104 |
<div class="long">
|
|
|
105 |
The function to call when a valid success return packet is recieved. The function is passed the following parameters:<ul class="mdetail-params"> <li><b>form</b> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li> <li><b>action</b> : Ext.form.Action<div class="sub-desc">The Action class. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a> property of this object may be examined to perform custom postprocessing.</div></li> </ul> </div>
|
|
|
106 |
</div>
|
|
|
107 |
</td>
|
|
|
108 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#success" href="output/Ext.form.Action.html#success">Action</a></td>
|
|
|
109 |
</tr>
|
|
|
110 |
<tr class="config-row inherited alt">
|
|
|
111 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
112 |
<td class="sig">
|
|
|
113 |
<a id="Ext.form.Action.Load-url"></a>
|
|
|
114 |
<b>url</b> : String <div class="mdesc">
|
|
|
115 |
The URL that the Action is to invoke. </div>
|
|
|
116 |
</td>
|
|
|
117 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#url" href="output/Ext.form.Action.html#url">Action</a></td>
|
|
|
118 |
</tr>
|
|
|
119 |
<tr class="config-row inherited">
|
|
|
120 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
121 |
<td class="sig">
|
|
|
122 |
<a id="Ext.form.Action.Load-waitMsg"></a>
|
|
|
123 |
<b>waitMsg</b> : String <div class="mdesc">
|
|
|
124 |
The message to be displayed by a call to <a ext:cls="Ext.MessageBox" ext:member="wait" href="output/Ext.MessageBox.html#wait">Ext.MessageBox.wait</a> during the time the action is being processed. </div>
|
|
|
125 |
</td>
|
|
|
126 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#waitMsg" href="output/Ext.form.Action.html#waitMsg">Action</a></td>
|
|
|
127 |
</tr>
|
|
|
128 |
<tr class="config-row inherited alt">
|
|
|
129 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
130 |
<td class="sig">
|
|
|
131 |
<a id="Ext.form.Action.Load-waitTitle"></a>
|
|
|
132 |
<b>waitTitle</b> : String <div class="mdesc">
|
|
|
133 |
The title to be displayed by a call to <a ext:cls="Ext.MessageBox" ext:member="wait" href="output/Ext.MessageBox.html#wait">Ext.MessageBox.wait</a> during the time the action is being processed. </div>
|
|
|
134 |
</td>
|
|
|
135 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#waitTitle" href="output/Ext.form.Action.html#waitTitle">Action</a></td>
|
|
|
136 |
</tr>
|
|
|
137 |
</table>
|
|
|
138 |
<a id="Ext.form.Action.Load-props"></a>
|
|
|
139 |
<h2>Public Properties</h2>
|
|
|
140 |
<table cellspacing="0" class="member-table">
|
|
|
141 |
<tr>
|
|
|
142 |
<th class="sig-header" colspan="2">Property</th>
|
|
|
143 |
<th class="msource-header">Defined By</th>
|
|
|
144 |
</tr>
|
|
|
145 |
<tr class="property-row inherited">
|
|
|
146 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
147 |
<td class="sig">
|
|
|
148 |
<a id="Ext.form.Action.Load-failureType"></a>
|
|
|
149 |
<b>failureType</b> : String <div class="mdesc">
|
|
|
150 |
The type of failure detected. See <a ext:cls="Ext.form.Action" ext:member="Ext.form.Action.CLIENT_INVALID" href="output/Ext.form.Action.html#Ext.form.Action.CLIENT_INVALID">CLIENT_INVALID</a>, <a ext:cls="Ext.form.Action" ext:member="Ext.form.Action.SERVER_INVALID" href="output/Ext.form.Action.html#Ext.form.Action.SERVER_INVALID">SERVER_INVALID</a>,
|
|
|
151 |
<a ext:cls="Ext.form.Action" ext:member="Ext.form.Action.CONNECT_FAILURE" href="output/Ext.form.Action.html#Ext.form.Action.CONNECT_FAILURE">CONNECT_FAILURE</a>, <a ext:cls="Ext.form.Action" ext:member="Ext.form.Action.LOAD_FAILURE" href="output/Ext.form.Action.html#Ext.form.Action.LOAD_FAILURE">LOAD_FAILURE</a> </div>
|
|
|
152 |
</td>
|
|
|
153 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#failureType" href="output/Ext.form.Action.html#failureType">Action</a></td>
|
|
|
154 |
</tr>
|
|
|
155 |
<tr class="property-row inherited alt">
|
|
|
156 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
157 |
<td class="sig">
|
|
|
158 |
<a id="Ext.form.Action.Load-response"></a>
|
|
|
159 |
<b>response</b> : Object <div class="mdesc">
|
|
|
160 |
|
|
|
161 |
The XMLHttpRequest object used to perform the action. </div>
|
|
|
162 |
</td>
|
|
|
163 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#response" href="output/Ext.form.Action.html#response">Action</a></td>
|
|
|
164 |
</tr>
|
|
|
165 |
<tr class="property-row inherited">
|
|
|
166 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
167 |
<td class="sig">
|
|
|
168 |
<a id="Ext.form.Action.Load-result"></a>
|
|
|
169 |
<b>result</b> : Object <div class="mdesc">
|
|
|
170 |
|
|
|
171 |
The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
|
|
|
172 |
other, action-specific properties. </div>
|
|
|
173 |
</td>
|
|
|
174 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#result" href="output/Ext.form.Action.html#result">Action</a></td>
|
|
|
175 |
</tr>
|
|
|
176 |
<tr class="property-row inherited alt">
|
|
|
177 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
178 |
<td class="sig">
|
|
|
179 |
<a id="Ext.form.Action.Load-type"></a>
|
|
|
180 |
<b>type</b> : String <div class="mdesc">
|
|
|
181 |
|
|
|
182 |
The type of action this Action instance performs.
|
|
|
183 |
Currently only "submit" and "load" are supported. </div>
|
|
|
184 |
</td>
|
|
|
185 |
<td class="msource"><a ext:cls="Ext.form.Action" ext:member="#type" href="output/Ext.form.Action.html#type">Action</a></td>
|
|
|
186 |
</tr>
|
|
|
187 |
</table>
|
|
|
188 |
<a id="Ext.form.Action.Load-methods"></a>
|
|
|
189 |
<h2>Public Methods</h2>
|
|
|
190 |
<div class="no-members">This class has no public methods.</div> <a id="Ext.form.Action.Load-events"></a>
|
|
|
191 |
<h2>Public Events</h2>
|
|
|
192 |
<div class="no-members">This class has no public events.</div>
|
|
|
193 |
</div>
|