[619] | 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"> |
---|
| 39 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 40 | <td class="sig"> |
---|
| 41 | <a id="Ext.form.Action-failure"></a> |
---|
| 42 | <b>failure</b> : Function <div class="mdesc"> |
---|
| 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> |
---|
| 44 | <div class="long"> |
---|
| 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> |
---|
| 46 | </div> |
---|
| 47 | </td> |
---|
| 48 | <td class="msource">Action</td> |
---|
| 49 | </tr> |
---|
| 50 | <tr class="config-row alt expandable"> |
---|
| 51 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 52 | <td class="sig"> |
---|
| 53 | <a id="Ext.form.Action-method"></a> |
---|
| 54 | <b>method</b> : String <div class="mdesc"> |
---|
| 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> |
---|
| 56 | <div class="long"> |
---|
| 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> |
---|
| 58 | </div> |
---|
| 59 | </td> |
---|
| 60 | <td class="msource">Action</td> |
---|
| 61 | </tr> |
---|
| 62 | <tr class="config-row expandable"> |
---|
| 63 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 64 | <td class="sig"> |
---|
| 65 | <a id="Ext.form.Action-params"></a> |
---|
| 66 | <b>params</b> : Mixed <div class="mdesc"> |
---|
| 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> |
---|
| 68 | <div class="long"> |
---|
| 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> |
---|
| 70 | </div> |
---|
| 71 | </td> |
---|
| 72 | <td class="msource">Action</td> |
---|
| 73 | </tr> |
---|
| 74 | <tr class="config-row alt expandable"> |
---|
| 75 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 76 | <td class="sig"> |
---|
| 77 | <a id="Ext.form.Action-reset"></a> |
---|
| 78 | <b>reset</b> : Boolean <div class="mdesc"> |
---|
| 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> |
---|
| 80 | <div class="long"> |
---|
| 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> |
---|
| 82 | </div> |
---|
| 83 | </td> |
---|
| 84 | <td class="msource">Action</td> |
---|
| 85 | </tr> |
---|
| 86 | <tr class="config-row"> |
---|
| 87 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 88 | <td class="sig"> |
---|
| 89 | <a id="Ext.form.Action-scope"></a> |
---|
| 90 | <b>scope</b> : Object <div class="mdesc"> |
---|
| 91 | The scope in which to call the callback functions (The <tt>this</tt> reference for the callback functions). </div> |
---|
| 92 | </td> |
---|
| 93 | <td class="msource">Action</td> |
---|
| 94 | </tr> |
---|
| 95 | <tr class="config-row alt expandable"> |
---|
| 96 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 97 | <td class="sig"> |
---|
| 98 | <a id="Ext.form.Action-success"></a> |
---|
| 99 | <b>success</b> : Function <div class="mdesc"> |
---|
| 100 | <div class="short">The function to call when a valid success return packet is recieved. The function is passed the following parameters:...</div> |
---|
| 101 | <div class="long"> |
---|
| 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> |
---|
| 103 | </div> |
---|
| 104 | </td> |
---|
| 105 | <td class="msource">Action</td> |
---|
| 106 | </tr> |
---|
| 107 | <tr class="config-row"> |
---|
| 108 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 109 | <td class="sig"> |
---|
| 110 | <a id="Ext.form.Action-timeout"></a> |
---|
| 111 | <b>timeout</b> : Number <div class="mdesc"> |
---|
| 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> |
---|
| 113 | </td> |
---|
| 114 | <td class="msource">Action</td> |
---|
| 115 | </tr> |
---|
| 116 | <tr class="config-row alt"> |
---|
| 117 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 118 | <td class="sig"> |
---|
| 119 | <a id="Ext.form.Action-url"></a> |
---|
| 120 | <b>url</b> : String <div class="mdesc"> |
---|
| 121 | The URL that the Action is to invoke. </div> |
---|
| 122 | </td> |
---|
| 123 | <td class="msource">Action</td> |
---|
| 124 | </tr> |
---|
| 125 | <tr class="config-row"> |
---|
| 126 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 127 | <td class="sig"> |
---|
| 128 | <a id="Ext.form.Action-waitMsg"></a> |
---|
| 129 | <b>waitMsg</b> : String <div class="mdesc"> |
---|
| 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> |
---|
| 131 | </td> |
---|
| 132 | <td class="msource">Action</td> |
---|
| 133 | </tr> |
---|
| 134 | <tr class="config-row alt"> |
---|
| 135 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 136 | <td class="sig"> |
---|
| 137 | <a id="Ext.form.Action-waitTitle"></a> |
---|
| 138 | <b>waitTitle</b> : String <div class="mdesc"> |
---|
| 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> |
---|
| 140 | </td> |
---|
| 141 | <td class="msource">Action</td> |
---|
| 142 | </tr> |
---|
| 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"> |
---|
| 152 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 153 | <td class="sig"> |
---|
| 154 | <a id="Ext.form.Action-Action.CLIENT_INVALID"></a> |
---|
| 155 | <b>Action.CLIENT_INVALID</b> : String <div class="mdesc"> |
---|
| 156 | <static> Failure type returned when client side validation of the Form fails |
---|
| 157 | thus aborting a submit action. </div> |
---|
| 158 | </td> |
---|
| 159 | <td class="msource">Action</td> |
---|
| 160 | </tr> |
---|
| 161 | <tr class="property-row alt expandable"> |
---|
| 162 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 163 | <td class="sig"> |
---|
| 164 | <a id="Ext.form.Action-Action.CONNECT_FAILURE"></a> |
---|
| 165 | <b>Action.CONNECT_FAILURE</b> : String <div class="mdesc"> |
---|
| 166 | <div class="short"><static> Failure type returned when a communication error happens when attempting |
---|
| 167 | to send a request to the remo...</div> |
---|
| 168 | <div class="long"> |
---|
| 169 | <static> Failure type returned when a communication error happens when attempting |
---|
| 170 | to send a request to the remote server. </div> |
---|
| 171 | </div> |
---|
| 172 | </td> |
---|
| 173 | <td class="msource">Action</td> |
---|
| 174 | </tr> |
---|
| 175 | <tr class="property-row"> |
---|
| 176 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 177 | <td class="sig"> |
---|
| 178 | <a id="Ext.form.Action-Action.LOAD_FAILURE"></a> |
---|
| 179 | <b>Action.LOAD_FAILURE</b> : String <div class="mdesc"> |
---|
| 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> |
---|
| 182 | </td> |
---|
| 183 | <td class="msource">Action</td> |
---|
| 184 | </tr> |
---|
| 185 | <tr class="property-row alt expandable"> |
---|
| 186 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 187 | <td class="sig"> |
---|
| 188 | <a id="Ext.form.Action-Action.SERVER_INVALID"></a> |
---|
| 189 | <b>Action.SERVER_INVALID</b> : String <div class="mdesc"> |
---|
| 190 | <div class="short"><static> Failure type returned when server side validation of the Form fails |
---|
| 191 | indicating that field-specific err...</div> |
---|
| 192 | <div class="long"> |
---|
| 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> |
---|
| 196 | </div> |
---|
| 197 | </td> |
---|
| 198 | <td class="msource">Action</td> |
---|
| 199 | </tr> |
---|
| 200 | <tr class="property-row expandable"> |
---|
| 201 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 202 | <td class="sig"> |
---|
| 203 | <a id="Ext.form.Action-failureType"></a> |
---|
| 204 | <b>failureType</b> : String <div class="mdesc"> |
---|
| 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> |
---|
| 207 | <div class="long"> |
---|
| 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> |
---|
| 211 | </div> |
---|
| 212 | </td> |
---|
| 213 | <td class="msource">Action</td> |
---|
| 214 | </tr> |
---|
| 215 | <tr class="property-row alt"> |
---|
| 216 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 217 | <td class="sig"> |
---|
| 218 | <a id="Ext.form.Action-response"></a> |
---|
| 219 | <b>response</b> : Object <div class="mdesc"> |
---|
| 220 | |
---|
| 221 | The XMLHttpRequest object used to perform the action. </div> |
---|
| 222 | </td> |
---|
| 223 | <td class="msource">Action</td> |
---|
| 224 | </tr> |
---|
| 225 | <tr class="property-row"> |
---|
| 226 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 227 | <td class="sig"> |
---|
| 228 | <a id="Ext.form.Action-result"></a> |
---|
| 229 | <b>result</b> : Object <div class="mdesc"> |
---|
| 230 | |
---|
| 231 | The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and |
---|
| 232 | other, action-specific properties. </div> |
---|
| 233 | </td> |
---|
| 234 | <td class="msource">Action</td> |
---|
| 235 | </tr> |
---|
| 236 | <tr class="property-row alt"> |
---|
| 237 | <td class="micon"><a class="exi" href="#expand"> </a></td> |
---|
| 238 | <td class="sig"> |
---|
| 239 | <a id="Ext.form.Action-type"></a> |
---|
| 240 | <b>type</b> : String <div class="mdesc"> |
---|
| 241 | |
---|
| 242 | The type of action this Action instance performs. |
---|
| 243 | Currently only "submit" and "load" are supported. </div> |
---|
| 244 | </td> |
---|
| 245 | <td class="msource">Action</td> |
---|
| 246 | </tr> |
---|
| 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> |
---|