Ext.form.Action.html
15.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<div class="body-wrap">
<div class="top-tools">
<a class="inner-link" href="#Ext.form.Action-props"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-prop">Properties</a>
<a class="inner-link" href="#Ext.form.Action-methods"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-method">Methods</a>
<a class="inner-link" href="#Ext.form.Action-events"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-event">Events</a>
<a class="inner-link" href="#Ext.form.Action-configs"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-config">Config Options</a>
<a class="bookmark" href="../docs/?class=Ext.form.Action"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-fav">Direct Link</a>
</div>
<h1>Class Ext.form.Action</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td class="hd-info">Ext.form</td></tr>
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/widgets/form/Action_wev8.js" target="_blank">Action_wev8.js</a></td></tr>
<tr><td class="label">Class:</td><td class="hd-info">Action</td></tr>
<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>
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
</table>
<div class="description">
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.
<br><br>
Instances of this class are only created by a <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Form</a> when
the Form needs to perform an action such as submit or load. The Configuration options
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>,
<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>.
<br><br>
The instance of Action which performed the action is passed to the success
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>,
<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>),
and to the <a ext:cls="Ext.form.BasicForm" ext:member="actioncomplete" href="output/Ext.form.BasicForm.html#actioncomplete">actioncomplete</a> and
<a ext:cls="Ext.form.BasicForm" ext:member="actionfailed" href="output/Ext.form.BasicForm.html#actionfailed">actionfailed</a> event handlers. </div>
<div class="hr"></div>
<a id="Ext.form.Action-configs"></a>
<h2>Config Options</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Config Options</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-failure"></a>
<b>failure</b> : Function <div class="mdesc">
<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>
<div class="long">
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>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-method"></a>
<b>method</b> : String <div class="mdesc">
<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>
<div class="long">
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>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-params"></a>
<b>params</b> : Mixed <div class="mdesc">
<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>
<div class="long">
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>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-scope"></a>
<b>scope</b> : Object <div class="mdesc">
The scope in which to call the callback functions (The <tt>this</tt> reference for the callback functions). </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-success"></a>
<b>success</b> : Function <div class="mdesc">
<div class="short">The function to call when a valid success return packet is recieved. The function is passed the following parameters:...</div>
<div class="long">
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>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-url"></a>
<b>url</b> : String <div class="mdesc">
The URL that the Action is to invoke. </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-waitMsg"></a>
<b>waitMsg</b> : String <div class="mdesc">
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>
</td>
<td class="msource">Action</td>
</tr>
<tr class="config-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-waitTitle"></a>
<b>waitTitle</b> : String <div class="mdesc">
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>
</td>
<td class="msource">Action</td>
</tr>
</table>
<a id="Ext.form.Action-props"></a>
<h2>Public Properties</h2>
<table cellspacing="0" class="member-table">
<tr>
<th class="sig-header" colspan="2">Property</th>
<th class="msource-header">Defined By</th>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-Action.CLIENT_INVALID"></a>
<b>Action.CLIENT_INVALID</b> : String <div class="mdesc">
<static> Failure type returned when client side validation of the Form fails
thus aborting a submit action. </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-Action.CONNECT_FAILURE"></a>
<b>Action.CONNECT_FAILURE</b> : String <div class="mdesc">
<div class="short"><static> Failure type returned when a communication error happens when attempting
to send a request to the remo...</div>
<div class="long">
<static> Failure type returned when a communication error happens when attempting
to send a request to the remote server. </div>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-Action.LOAD_FAILURE"></a>
<b>Action.LOAD_FAILURE</b> : String <div class="mdesc">
<static> Failure type returned when no field values are returned in the response's
<tt style="font-weight:bold">data</tt> property. </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-Action.SERVER_INVALID"></a>
<b>Action.SERVER_INVALID</b> : String <div class="mdesc">
<div class="short"><static> Failure type returned when server side validation of the Form fails
indicating that field-specific err...</div>
<div class="long">
<static> Failure type returned when server side validation of the Form fails
indicating that field-specific error messages have been returned in the
response's <tt style="font-weight:bold">errors</tt> property. </div>
</div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-failureType"></a>
<b>failureType</b> : String <div class="mdesc">
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>,
<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>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-response"></a>
<b>response</b> : Object <div class="mdesc">
The XMLHttpRequest object used to perform the action. </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-result"></a>
<b>result</b> : Object <div class="mdesc">
The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and
other, action-specific properties. </div>
</td>
<td class="msource">Action</td>
</tr>
<tr class="property-row alt">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.form.Action-type"></a>
<b>type</b> : String <div class="mdesc">
The type of action this Action instance performs.
Currently only "submit" and "load" are supported. </div>
</td>
<td class="msource">Action</td>
</tr>
</table>
<a id="Ext.form.Action-methods"></a>
<h2>Public Methods</h2>
<div class="no-members">This class has no public methods.</div> <a id="Ext.form.Action-events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div>
</div>