commit extjs-2.2.1
[extjs.git] / docs / output / Ext.form.Action.html
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>
8         </div>
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>
16                     </table>
17         <div class="description">
18             *
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>
29         
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">
34             <tr>
35                 <th class="sig-header" colspan="2">Config Options</th>
36                 <th class="msource-header">Defined By</th>
37             </tr>
38                 <tr class="config-row expandable">\r
39         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
40         <td class="sig">\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
44             <div class="long">\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
46                         </div>\r
47         </td>\r
48         <td class="msource">Action</td>\r
49     </tr>\r
50         <tr class="config-row alt expandable">\r
51         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
52         <td class="sig">\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
56             <div class="long">\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
58                         </div>\r
59         </td>\r
60         <td class="msource">Action</td>\r
61     </tr>\r
62         <tr class="config-row expandable">\r
63         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
64         <td class="sig">\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
68             <div class="long">\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
70                         </div>\r
71         </td>\r
72         <td class="msource">Action</td>\r
73     </tr>\r
74         <tr class="config-row alt expandable">\r
75         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
76         <td class="sig">\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
80             <div class="long">\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
82                         </div>\r
83         </td>\r
84         <td class="msource">Action</td>\r
85     </tr>\r
86         <tr class="config-row">\r
87         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
88         <td class="sig">\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
92         </td>\r
93         <td class="msource">Action</td>\r
94     </tr>\r
95         <tr class="config-row alt expandable">\r
96         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
97         <td class="sig">\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
101             <div class="long">\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
103                         </div>\r
104         </td>\r
105         <td class="msource">Action</td>\r
106     </tr>\r
107         <tr class="config-row">\r
108         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
109         <td class="sig">\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
113         </td>\r
114         <td class="msource">Action</td>\r
115     </tr>\r
116         <tr class="config-row alt">\r
117         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
118         <td class="sig">\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
122         </td>\r
123         <td class="msource">Action</td>\r
124     </tr>\r
125         <tr class="config-row">\r
126         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
127         <td class="sig">\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
131         </td>\r
132         <td class="msource">Action</td>\r
133     </tr>\r
134         <tr class="config-row alt">\r
135         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
136         <td class="sig">\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
140         </td>\r
141         <td class="msource">Action</td>\r
142     </tr>\r
143             </table>
144                 <a id="Ext.form.Action-props"></a>
145         <h2>Public Properties</h2>
146                 <table cellspacing="0" class="member-table">
147             <tr>
148                 <th class="sig-header" colspan="2">Property</th>
149                 <th class="msource-header">Defined By</th>
150             </tr>
151                 <tr class="property-row">\r
152         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
153         <td class="sig">\r
154         <a id="Ext.form.Action-Action.CLIENT_INVALID"></a>\r
155             <b>Action.CLIENT_INVALID</b> : String            <div class="mdesc">\r
156                             &lt;static&gt; Failure type returned when client side validation of the Form fails
157 thus aborting a submit action.                        </div>\r
158         </td>\r
159         <td class="msource">Action</td>\r
160     </tr>\r
161         <tr class="property-row alt expandable">\r
162         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
163         <td class="sig">\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">&lt;static&gt; Failure type returned when a communication error happens when attempting
167 to send a request to the remo...</div>\r
168             <div class="long">\r
169                 &lt;static&gt; Failure type returned when a communication error happens when attempting
170 to send a request to the remote server.            </div>\r
171                         </div>\r
172         </td>\r
173         <td class="msource">Action</td>\r
174     </tr>\r
175         <tr class="property-row">\r
176         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
177         <td class="sig">\r
178         <a id="Ext.form.Action-Action.LOAD_FAILURE"></a>\r
179             <b>Action.LOAD_FAILURE</b> : String            <div class="mdesc">\r
180                             &lt;static&gt; Failure type returned when no field values are returned in the response's
181 <tt style="font-weight:bold">data</tt> property.                        </div>\r
182         </td>\r
183         <td class="msource">Action</td>\r
184     </tr>\r
185         <tr class="property-row alt expandable">\r
186         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
187         <td class="sig">\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">&lt;static&gt; Failure type returned when server side validation of the Form fails
191 indicating that field-specific err...</div>\r
192             <div class="long">\r
193                 &lt;static&gt; 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
196                         </div>\r
197         </td>\r
198         <td class="msource">Action</td>\r
199     </tr>\r
200         <tr class="property-row expandable">\r
201         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
202         <td class="sig">\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
207             <div class="long">\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
211                         </div>\r
212         </td>\r
213         <td class="msource">Action</td>\r
214     </tr>\r
215         <tr class="property-row alt">\r
216         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
217         <td class="sig">\r
218         <a id="Ext.form.Action-response"></a>\r
219             <b>response</b> : Object            <div class="mdesc">\r
220                             
221 The XMLHttpRequest object used to perform the action.                        </div>\r
222         </td>\r
223         <td class="msource">Action</td>\r
224     </tr>\r
225         <tr class="property-row">\r
226         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
227         <td class="sig">\r
228         <a id="Ext.form.Action-result"></a>\r
229             <b>result</b> : Object            <div class="mdesc">\r
230                             
231 The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
232 other, action-specific properties.                        </div>\r
233         </td>\r
234         <td class="msource">Action</td>\r
235     </tr>\r
236         <tr class="property-row alt">\r
237         <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>\r
238         <td class="sig">\r
239         <a id="Ext.form.Action-type"></a>\r
240             <b>type</b> : String            <div class="mdesc">\r
241                             
242 The type of action this Action instance performs.
243 Currently only "submit" and "load" are supported.                        </div>\r
244         </td>\r
245         <td class="msource">Action</td>\r
246     </tr>\r
247             </table>
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>
253         </div>