1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.form.Action-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.form.Action-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.form.Action-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="inner-link" href="#Ext.form.Action-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"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
9 <h1>Class Ext.form.Action</h1>
10 <table cellspacing="0">
11 <tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
12 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/Action.js" target="_blank">Action.js</a></td></tr>
13 <tr><td class="label">Class:</td><td class="hd-info">Action</td></tr>
14 <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.form.Action.Load" href="output/Ext.form.Action.Load.html">Action.Load</a>, <a ext:cls="Ext.form.Action.Submit" href="output/Ext.form.Action.Submit.html">Action.Submit</a></td></tr>
15 <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
17 <div class="description">
19 <p>The subclasses of this class provide actions to perform upon <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a>s.</p>
20 <p>Instances of this class are only created by a <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a> when
21 the Form needs to perform an action such as submit or load. The Configuration options
22 listed for this class are set through the Form's action methods: <a ext:cls="Ext.form.BasicForm" ext:member="submit" href="output/Ext.form.BasicForm.html#submit">submit</a>,
23 <a ext:cls="Ext.form.BasicForm" ext:member="load" href="output/Ext.form.BasicForm.html#load">load</a> and <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a></p>
24 <p>The instance of Action which performed the action is passed to the success
25 and failure callbacks of the Form's action methods (<a ext:cls="Ext.form.BasicForm" ext:member="submit" href="output/Ext.form.BasicForm.html#submit">submit</a>,
26 <a ext:cls="Ext.form.BasicForm" ext:member="load" href="output/Ext.form.BasicForm.html#load">load</a> and <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a>),
27 and to the <a ext:cls="Ext.form.BasicForm" ext:member="actioncomplete" href="output/Ext.form.BasicForm.html#actioncomplete">actioncomplete</a> and
28 <a ext:cls="Ext.form.BasicForm" ext:member="actionfailed" href="output/Ext.form.BasicForm.html#actionfailed">actionfailed</a> event handlers.</p> </div>
30 <div class="hr"></div>
31 <a id="Ext.form.Action-configs"></a>
32 <h2>Config Options</h2>
33 <table cellspacing="0" class="member-table">
35 <th class="sig-header" colspan="2">Config Options</th>
36 <th class="msource-header">Defined By</th>
38 <tr class="config-row expandable">
\r
39 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
41 <a id="Ext.form.Action-failure"></a>
\r
42 <b>failure</b> : Function <div class="mdesc">
\r
43 <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>
\r
45 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>
\r
48 <td class="msource">Action</td>
\r
50 <tr class="config-row alt expandable">
\r
51 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
53 <a id="Ext.form.Action-method"></a>
\r
54 <b>method</b> : String <div class="mdesc">
\r
55 <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>
\r
57 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>
\r
60 <td class="msource">Action</td>
\r
62 <tr class="config-row expandable">
\r
63 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
65 <a id="Ext.form.Action-params"></a>
\r
66 <b>params</b> : Mixed <div class="mdesc">
\r
67 <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>
\r
69 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>
\r
72 <td class="msource">Action</td>
\r
74 <tr class="config-row alt expandable">
\r
75 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
77 <a id="Ext.form.Action-reset"></a>
\r
78 <b>reset</b> : Boolean <div class="mdesc">
\r
79 <div class="short">When set to true, causes the Form to be reset on Action success. If specified, this happens before the success callba...</div>
\r
81 When set to <tt><b>true</b></tt>, causes the Form to be <a ext:cls="Ext.form.BasicForm.reset" href="output/Ext.form.BasicForm.reset.html">reset</a> on Action success. If specified, this happens <b>before</b> the <a ext:cls="Ext.form.Action" ext:member="success" href="output/Ext.form.Action.html#success">success</a> callback is called and before the Form's <a ext:cls="Ext.form.BasicForm.actioncomplete" href="output/Ext.form.BasicForm.actioncomplete.html">actioncomplete</a> event fires. </div>
\r
84 <td class="msource">Action</td>
\r
86 <tr class="config-row">
\r
87 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
89 <a id="Ext.form.Action-scope"></a>
\r
90 <b>scope</b> : Object <div class="mdesc">
\r
91 The scope in which to call the callback functions (The <tt>this</tt> reference for the callback functions). </div>
\r
93 <td class="msource">Action</td>
\r
95 <tr class="config-row alt expandable">
\r
96 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
98 <a id="Ext.form.Action-success"></a>
\r
99 <b>success</b> : Function <div class="mdesc">
\r
100 <div class="short">The function to call when a valid success return packet is recieved. The function is passed the following parameters:...</div>
\r
102 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>
\r
105 <td class="msource">Action</td>
\r
107 <tr class="config-row">
\r
108 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
110 <a id="Ext.form.Action-timeout"></a>
\r
111 <b>timeout</b> : Number <div class="mdesc">
\r
112 The number of milliseconds to wait for a server response before failing with the <a ext:cls="Ext.form.Action" ext:member="failureType" href="output/Ext.form.Action.html#failureType">failureType</a> as <a ext:cls="Ext.form.Action" ext:member="Action.CONNECT_FAILURE" href="output/Ext.form.Action.html#Action.CONNECT_FAILURE">Action.CONNECT_FAILURE</a>. </div>
\r
114 <td class="msource">Action</td>
\r
116 <tr class="config-row alt">
\r
117 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
119 <a id="Ext.form.Action-url"></a>
\r
120 <b>url</b> : String <div class="mdesc">
\r
121 The URL that the Action is to invoke. </div>
\r
123 <td class="msource">Action</td>
\r
125 <tr class="config-row">
\r
126 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
128 <a id="Ext.form.Action-waitMsg"></a>
\r
129 <b>waitMsg</b> : String <div class="mdesc">
\r
130 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>
\r
132 <td class="msource">Action</td>
\r
134 <tr class="config-row alt">
\r
135 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
137 <a id="Ext.form.Action-waitTitle"></a>
\r
138 <b>waitTitle</b> : String <div class="mdesc">
\r
139 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>
\r
141 <td class="msource">Action</td>
\r
144 <a id="Ext.form.Action-props"></a>
145 <h2>Public Properties</h2>
146 <table cellspacing="0" class="member-table">
148 <th class="sig-header" colspan="2">Property</th>
149 <th class="msource-header">Defined By</th>
151 <tr class="property-row">
\r
152 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
154 <a id="Ext.form.Action-Action.CLIENT_INVALID"></a>
\r
155 <b>Action.CLIENT_INVALID</b> : String <div class="mdesc">
\r
156 <static> Failure type returned when client side validation of the Form fails
157 thus aborting a submit action. </div>
\r
159 <td class="msource">Action</td>
\r
161 <tr class="property-row alt expandable">
\r
162 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
164 <a id="Ext.form.Action-Action.CONNECT_FAILURE"></a>
\r
165 <b>Action.CONNECT_FAILURE</b> : String <div class="mdesc">
\r
166 <div class="short"><static> Failure type returned when a communication error happens when attempting
167 to send a request to the remo...</div>
\r
169 <static> Failure type returned when a communication error happens when attempting
170 to send a request to the remote server. </div>
\r
173 <td class="msource">Action</td>
\r
175 <tr class="property-row">
\r
176 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
178 <a id="Ext.form.Action-Action.LOAD_FAILURE"></a>
\r
179 <b>Action.LOAD_FAILURE</b> : String <div class="mdesc">
\r
180 <static> Failure type returned when no field values are returned in the response's
181 <tt style="font-weight:bold">data</tt> property. </div>
\r
183 <td class="msource">Action</td>
\r
185 <tr class="property-row alt expandable">
\r
186 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
188 <a id="Ext.form.Action-Action.SERVER_INVALID"></a>
\r
189 <b>Action.SERVER_INVALID</b> : String <div class="mdesc">
\r
190 <div class="short"><static> Failure type returned when server side validation of the Form fails
191 indicating that field-specific err...</div>
\r
193 <static> Failure type returned when server side validation of the Form fails
194 indicating that field-specific error messages have been returned in the
195 response's <tt style="font-weight:bold">errors</tt> property. </div>
\r
198 <td class="msource">Action</td>
\r
200 <tr class="property-row expandable">
\r
201 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
203 <a id="Ext.form.Action-failureType"></a>
\r
204 <b>failureType</b> : String <div class="mdesc">
\r
205 <div class="short">The type of failure detected. See Ext.form.Action#Action.CLIENT_INVALID CLIENT_INVALID,
206 Ext.form.Action#Action.SERVER...</div>
\r
208 The type of failure detected. See <a ext:cls="link" href="output/link.html">Ext.form.Action#Action.CLIENT_INVALID CLIENT_INVALID</a>,
209 <a ext:cls="link" href="output/link.html">Ext.form.Action#Action.SERVER_INVALID SERVER_INVALID</a>,
210 <a ext:cls="Ext.form.Action" ext:member="link" href="output/Ext.form.Action.html#link">Ext.form.ActionAction.CONNECT_FAILURE CONNECT_FAILURE</a>, {@link Ext.form.Action#Action.LOAD_FAILURE LOAD_FAILURE} </div>
\r
213 <td class="msource">Action</td>
\r
215 <tr class="property-row alt">
\r
216 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
218 <a id="Ext.form.Action-response"></a>
\r
219 <b>response</b> : Object <div class="mdesc">
\r
221 The XMLHttpRequest object used to perform the action. </div>
\r
223 <td class="msource">Action</td>
\r
225 <tr class="property-row">
\r
226 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
228 <a id="Ext.form.Action-result"></a>
\r
229 <b>result</b> : Object <div class="mdesc">
\r
231 The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
232 other, action-specific properties. </div>
\r
234 <td class="msource">Action</td>
\r
236 <tr class="property-row alt">
\r
237 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
239 <a id="Ext.form.Action-type"></a>
\r
240 <b>type</b> : String <div class="mdesc">
\r
242 The type of action this Action instance performs.
243 Currently only "submit" and "load" are supported. </div>
\r
245 <td class="msource">Action</td>
\r
248 <a id="Ext.form.Action-methods"></a>
249 <h2>Public Methods</h2>
250 <div class="no-members">This class has no public methods.</div> <a id="Ext.form.Action-events"></a>
251 <h2>Public Events</h2>
252 <div class="no-members">This class has no public events.</div>