source: trunk/web/addons/job_monarch/lib/extjs/docs/output/Ext.form.BasicForm.html @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 59.7 KB
Line 
1        <div class="body-wrap">
2        <div class="top-tools">
3            <a class="inner-link" href="#Ext.form.BasicForm-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4            <a class="inner-link" href="#Ext.form.BasicForm-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5            <a class="inner-link" href="#Ext.form.BasicForm-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                            <a class="inner-link" href="#Ext.form.BasicForm-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.BasicForm"><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.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11  <img src="resources/elbow-end.gif"/>BasicForm</pre></div>
12                <h1>Class Ext.form.BasicForm</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="../src/BasicForm.js" target="_blank">BasicForm.js</a></td></tr>
16            <tr><td class="label">Class:</td><td class="hd-info">BasicForm</td></tr>
17                                    <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
18                    </table>
19        <div class="description">
20            *
21<p>Encapsulates the DOM &lt;form> element at the heart of the <a ext:cls="Ext.form.FormPanel" href="output/Ext.form.FormPanel.html">FormPanel</a> class, and provides
22input field management, validation, submission, and form loading services.</p>
23<p>By default, Ext Forms are submitted through Ajax, using an instance of <a ext:cls="Ext.form.Action.Submit" href="output/Ext.form.Action.Submit.html">Ext.form.Action.Submit</a>.
24To enable normal browser submission of an Ext Form, use the <a ext:cls="Ext.form.BasicForm" ext:member="standardSubmit" href="output/Ext.form.BasicForm.html#standardSubmit">standardSubmit</a> config option.</p>
25<p><h3>File Uploads</h3><a ext:cls="Ext.form.BasicForm" ext:member="fileUpload" href="output/Ext.form.BasicForm.html#fileUpload">File uploads</a> are not performed using Ajax submission, that
26is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard
27manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its
28<a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
29to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document
30but removed after the return data has been gathered.</p>
31<p>The server response is parsed by the browser to create the document for the IFRAME. If the
32server is using JSON to send the return object, then the
33<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header
34must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p>
35<p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode
36"&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p>
37<p>The response text is retrieved from the document, and a fake XMLHttpRequest object
38is created containing a <tt>responseText</tt> property in order to conform to the
39requirements of event handlers and callbacks.</p>
40<p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a>
41and some server technologies (notably JEE) may require some custom processing in order to
42retrieve parameter names and parameter values from the packet content.</p>        </div>
43       
44        <div class="hr"></div>
45                <a id="Ext.form.BasicForm-configs"></a>
46        <h2>Config Options</h2>
47        <table cellspacing="0" class="member-table">
48            <tr>
49                <th class="sig-header" colspan="2">Config Options</th>
50                <th class="msource-header">Defined By</th>
51            </tr>
52                <tr class="config-row">
53        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
54        <td class="sig">
55        <a id="Ext.form.BasicForm-baseParams"></a>
56            <b>baseParams</b> : Object            <div class="mdesc">
57                            Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.                        </div>
58        </td>
59        <td class="msource">BasicForm</td>
60    </tr>
61        <tr class="config-row alt expandable">
62        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
63        <td class="sig">
64        <a id="Ext.form.BasicForm-errorReader"></a>
65            <b>errorReader</b> : DataReader            <div class="mdesc">
66                        <div class="short">An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read field error messages returned from "submit" actio...</div>
67            <div class="long">
68                <p>An Ext.data.DataReader (e.g. <a ext:cls="Ext.data.XmlReader" href="output/Ext.data.XmlReader.html">Ext.data.XmlReader</a>) to be used to read field error messages returned from "submit" actions. This is completely optional as there is built-in support for processing JSON.</p> <p>The Records which provide messages for the invalid Fields must use the Field name (or id) as the Record ID, and must contain a field called "msg" which contains the error message.</p> <p>The errorReader does not have to be a full-blown implementation of a DataReader. It simply needs to implement a <tt>read(xhr)</tt> function which returns an Array of Records in an object with the following structure:<pre><code>{
69    records: recordArray
70}</code></pre>            </div>
71                        </div>
72        </td>
73        <td class="msource">BasicForm</td>
74    </tr>
75        <tr class="config-row expandable">
76        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
77        <td class="sig">
78        <a id="Ext.form.BasicForm-fileUpload"></a>
79            <b>fileUpload</b> : Boolean            <div class="mdesc">
80                        <div class="short">Set to true if this form is a file upload. File uploads are not performed using normal "Ajax" techniques, that is the...</div>
81            <div class="long">
82                Set to true if this form is a file upload. <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the DOM <tt>&lt;form></tt> element temporarily modified to have its <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer to a dynamically generated, hidden <tt>&lt;iframe></tt> which is inserted into the document but removed after the return data has been gathered.</p> <p>The server response is parsed by the browser to create the document for the IFRAME. If the server is using JSON to send the return object, then the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p> <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode "&lt;" as "&amp;lt;", "&amp;" as "&amp;amp;" etc.</p> <p>The response text is retrieved from the document, and a fake XMLHttpRequest object is created containing a <tt>responseText</tt> property in order to conform to the requirements of event handlers and callbacks.</p> <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a> and some server technologies (notably JEE) may require some custom processing in order to retrieve parameter names and parameter values from the packet content.</p>            </div>
83                        </div>
84        </td>
85        <td class="msource">BasicForm</td>
86    </tr>
87        <tr class="config-row inherited alt expandable">
88        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
89        <td class="sig">
90        <a id="Ext.form.BasicForm-listeners"></a>
91            <b>listeners</b> : Object            <div class="mdesc">
92                        <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
93            <div class="long">
94                (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once.            </div>
95                        </div>
96        </td>
97        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
98    </tr>
99        <tr class="config-row">
100        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
101        <td class="sig">
102        <a id="Ext.form.BasicForm-method"></a>
103            <b>method</b> : String            <div class="mdesc">
104                            The request method to use (GET or POST) for form actions if one isn't supplied in the action options.                        </div>
105        </td>
106        <td class="msource">BasicForm</td>
107    </tr>
108        <tr class="config-row alt expandable">
109        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
110        <td class="sig">
111        <a id="Ext.form.BasicForm-reader"></a>
112            <b>reader</b> : DataReader            <div class="mdesc">
113                        <div class="short">An Ext.data.DataReader (e.g. Ext.data.XmlReader) to be used to read data when executing "load" actions. This is optio...</div>
114            <div class="long">
115                An Ext.data.DataReader (e.g. <a ext:cls="Ext.data.XmlReader" href="output/Ext.data.XmlReader.html">Ext.data.XmlReader</a>) to be used to read data when executing "load" actions. This is optional as there is built-in support for processing JSON.            </div>
116                        </div>
117        </td>
118        <td class="msource">BasicForm</td>
119    </tr>
120        <tr class="config-row expandable">
121        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
122        <td class="sig">
123        <a id="Ext.form.BasicForm-standardSubmit"></a>
124            <b>standardSubmit</b> : Boolean            <div class="mdesc">
125                        <div class="short">If set to true, standard HTML form submits are used instead of XHR (Ajax) style form submissions. (defaults to false)...</div>
126            <div class="long">
127                If set to true, standard HTML form submits are used instead of XHR (Ajax) style form submissions. (defaults to false)<br> <p><b>Note:</b> When using standardSubmit, any the options to <a ext:cls="Ext.form.BasicForm" ext:member="submit" href="output/Ext.form.BasicForm.html#submit">submit</a> are ignored because Ext's Ajax infrastracture is bypassed. To pass extra parameters, you will need to create hidden fields within the form.</p>            </div>
128                        </div>
129        </td>
130        <td class="msource">BasicForm</td>
131    </tr>
132        <tr class="config-row alt">
133        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
134        <td class="sig">
135        <a id="Ext.form.BasicForm-timeout"></a>
136            <b>timeout</b> : Number            <div class="mdesc">
137                            Timeout for form actions in seconds (default is 30 seconds).                        </div>
138        </td>
139        <td class="msource">BasicForm</td>
140    </tr>
141        <tr class="config-row">
142        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
143        <td class="sig">
144        <a id="Ext.form.BasicForm-trackResetOnLoad"></a>
145            <b>trackResetOnLoad</b> : Boolean            <div class="mdesc">
146                            If set to true, form.reset() resets to the last loaded or setValues() data instead of when the form was first created.                        </div>
147        </td>
148        <td class="msource">BasicForm</td>
149    </tr>
150        <tr class="config-row alt">
151        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
152        <td class="sig">
153        <a id="Ext.form.BasicForm-url"></a>
154            <b>url</b> : String            <div class="mdesc">
155                            The URL to use for form actions if one isn't supplied in the action options.                        </div>
156        </td>
157        <td class="msource">BasicForm</td>
158    </tr>
159            </table>
160                <a id="Ext.form.BasicForm-props"></a>
161        <h2>Public Properties</h2>
162                <table cellspacing="0" class="member-table">
163            <tr>
164                <th class="sig-header" colspan="2">Property</th>
165                <th class="msource-header">Defined By</th>
166            </tr>
167                <tr class="property-row expandable">
168        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
169        <td class="sig">
170        <a id="Ext.form.BasicForm-waitMsgTarget"></a>
171            <b>waitMsgTarget</b> : Mixed            <div class="mdesc">
172                        <div class="short">
173By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
174element by passing it or ...</div>
175            <div class="long">
176               
177By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
178element by passing it or its id or mask the form itself by passing in true.            </div>
179                        </div>
180        </td>
181        <td class="msource">BasicForm</td>
182    </tr>
183            </table>
184                <a id="Ext.form.BasicForm-methods"></a>
185        <h2>Public Methods</h2>
186                <table cellspacing="0" class="member-table">
187            <tr>
188                <th class="sig-header" colspan="2">Method</th>
189                <th class="msource-header">Defined By</th>
190            </tr>
191                <tr class="method-row expandable">
192        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
193        <td class="sig">
194        <a id="Ext.form.BasicForm-BasicForm"></a>
195            <b>BasicForm</b>(&nbsp;<code>Mixed el</code>, <code>Object config</code>&nbsp;)            <div class="mdesc">
196                        <div class="short"></div>
197            <div class="long">
198                    <div class="mdetail-params">
199        <strong>Parameters:</strong>
200        <ul><li><code>el</code> : Mixed<div class="sub-desc">The form element or its id</div></li><li><code>config</code> : Object<div class="sub-desc">Configuration options</div></li>        </ul>
201        <strong>Returns:</strong>
202        <ul>
203            <li><code></code></li>
204        </ul>
205    </div>
206                </div>
207                        </div>
208        </td>
209        <td class="msource">BasicForm</td>
210    </tr>
211        <tr class="method-row alt expandable">
212        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
213        <td class="sig">
214        <a id="Ext.form.BasicForm-add"></a>
215            <b>add</b>(&nbsp;<code>Field field1</code>, <span class="optional" title="Optional">[<code>Field field2</code>]</span>, <span class="optional" title="Optional">[<code>Field etc</code>]</span>&nbsp;) : BasicForm            <div class="mdesc">
216                        <div class="short">Add Ext.form Components to this form's Collection. This does not result in rendering of
217the passed Component, it just...</div>
218            <div class="long">
219                Add Ext.form Components to this form's Collection. This does not result in rendering of
220the passed Component, it just enables the form to validate Fields, and distribute values to
221Fields.
222<p><b>You will not usually call this function. In order to be rendered, a Field must be added
223to a <a ext:cls="Ext.Container" href="output/Ext.Container.html">Container</a>, usually an <a ext:cls="Ext.form.FormPanel" href="output/Ext.form.FormPanel.html">FormPanel</a>.
224The FormPanel to which the field is added takes care of adding the Field to the BasicForm's
225collection.</b></p>    <div class="mdetail-params">
226        <strong>Parameters:</strong>
227        <ul><li><code>field1</code> : Field<div class="sub-desc"></div></li><li><code>field2</code> : Field<div class="sub-desc">(optional)</div></li><li><code>etc</code> : Field<div class="sub-desc">(optional)</div></li>        </ul>
228        <strong>Returns:</strong>
229        <ul>
230            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
231        </ul>
232    </div>
233                </div>
234                        </div>
235        </td>
236        <td class="msource">BasicForm</td>
237    </tr>
238        <tr class="method-row inherited expandable">
239        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
240        <td class="sig">
241        <a id="Ext.form.BasicForm-addEvents"></a>
242            <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">
243                        <div class="short">Used to define events on this Observable</div>
244            <div class="long">
245                Used to define events on this Observable    <div class="mdetail-params">
246        <strong>Parameters:</strong>
247        <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li>        </ul>
248        <strong>Returns:</strong>
249        <ul>
250            <li><code>void</code></li>
251        </ul>
252    </div>
253                </div>
254                        </div>
255        </td>
256        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
257    </tr>
258        <tr class="method-row inherited alt expandable">
259        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
260        <td class="sig">
261        <a id="Ext.form.BasicForm-addListener"></a>
262            <b>addListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
263                        <div class="short">Appends an event handler to this component</div>
264            <div class="long">
265                Appends an event handler to this component    <div class="mdetail-params">
266        <strong>Parameters:</strong>
267        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
268function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
269properties. This may contain any of the following properties:<ul>
270<li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
271<li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
272<li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
273<li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
274by the specified number of milliseconds. If the event fires again within that time, the original
275handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
276</ul><br>
277<p>
278<b>Combining Options</b><br>
279Using the options argument, it is possible to combine different types of listeners:<br>
280<br>
281A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
282<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
283    single: true,
284    delay: 100,
285    forumId: 4
286});</code></pre>
287<p>
288<b>Attaching multiple handlers in 1 call</b><br>
289The method also allows for a single argument to be passed which is a config object containing properties
290which specify multiple handlers.
291<p>
292<pre><code>foo.on({
293    <em>'click'</em> : {
294        fn: <b>this</b>.onClick,
295        scope: <b>this</b>,
296        delay: 100
297    },
298    <em>'mouseover'</em> : {
299        fn: <b>this</b>.onMouseOver,
300        scope: <b>this</b>
301    },
302    <em>'mouseout'</em> : {
303        fn: <b>this</b>.onMouseOut,
304        scope: <b>this</b>
305    }
306});</code></pre>
307<p>
308Or a shorthand syntax:<br>
309<pre><code>foo.on({
310    <em>'click'</em> : <b>this</b>.onClick,
311    <em>'mouseover'</em> : <b>this</b>.onMouseOver,
312    <em>'mouseout'</em> : <b>this</b>.onMouseOut,
313     scope: <b>this</b>
314});</code></pre></div></li>        </ul>
315        <strong>Returns:</strong>
316        <ul>
317            <li><code>void</code></li>
318        </ul>
319    </div>
320                </div>
321                        </div>
322        </td>
323        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
324    </tr>
325        <tr class="method-row expandable">
326        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
327        <td class="sig">
328        <a id="Ext.form.BasicForm-applyIfToFields"></a>
329            <b>applyIfToFields</b>(&nbsp;<code>Object values</code>&nbsp;) : BasicForm            <div class="mdesc">
330                        <div class="short">Calls <a ext:cls="Ext" ext:member="applyIf" href="output/Ext.html#applyIf">Ext.applyIf</a> for all field in this form with the passed object.</div>
331            <div class="long">
332                Calls <a ext:cls="Ext" ext:member="applyIf" href="output/Ext.html#applyIf">Ext.applyIf</a> for all field in this form with the passed object.    <div class="mdetail-params">
333        <strong>Parameters:</strong>
334        <ul><li><code>values</code> : Object<div class="sub-desc"></div></li>        </ul>
335        <strong>Returns:</strong>
336        <ul>
337            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
338        </ul>
339    </div>
340                </div>
341                        </div>
342        </td>
343        <td class="msource">BasicForm</td>
344    </tr>
345        <tr class="method-row alt expandable">
346        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
347        <td class="sig">
348        <a id="Ext.form.BasicForm-applyToFields"></a>
349            <b>applyToFields</b>(&nbsp;<code>Object values</code>&nbsp;) : BasicForm            <div class="mdesc">
350                        <div class="short">Calls <a ext:cls="Ext" ext:member="apply" href="output/Ext.html#apply">Ext.apply</a> for all fields in this form with the passed object.</div>
351            <div class="long">
352                Calls <a ext:cls="Ext" ext:member="apply" href="output/Ext.html#apply">Ext.apply</a> for all fields in this form with the passed object.    <div class="mdetail-params">
353        <strong>Parameters:</strong>
354        <ul><li><code>values</code> : Object<div class="sub-desc"></div></li>        </ul>
355        <strong>Returns:</strong>
356        <ul>
357            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
358        </ul>
359    </div>
360                </div>
361                        </div>
362        </td>
363        <td class="msource">BasicForm</td>
364    </tr>
365        <tr class="method-row expandable">
366        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
367        <td class="sig">
368        <a id="Ext.form.BasicForm-clearInvalid"></a>
369            <b>clearInvalid</b>() : BasicForm            <div class="mdesc">
370                        <div class="short">Clears all invalid messages in this form.</div>
371            <div class="long">
372                Clears all invalid messages in this form.    <div class="mdetail-params">
373        <strong>Parameters:</strong>
374        <ul><li>None.</li>        </ul>
375        <strong>Returns:</strong>
376        <ul>
377            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
378        </ul>
379    </div>
380                </div>
381                        </div>
382        </td>
383        <td class="msource">BasicForm</td>
384    </tr>
385        <tr class="method-row alt expandable">
386        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
387        <td class="sig">
388        <a id="Ext.form.BasicForm-doAction"></a>
389            <b>doAction</b>(&nbsp;<code>String/Object actionName</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : BasicForm            <div class="mdesc">
390                        <div class="short">Performs a predefined action (Ext.form.Action.Submit or
391Ext.form.Action.Load) or a custom extension of Ext.form.Actio...</div>
392            <div class="long">
393                Performs a predefined action (<a ext:cls="Ext.form.Action.Submit" href="output/Ext.form.Action.Submit.html">Ext.form.Action.Submit</a> or
394<a ext:cls="Ext.form.Action.Load" href="output/Ext.form.Action.Load.html">Ext.form.Action.Load</a>) or a custom extension of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> 
395to perform application-specific processing.    <div class="mdetail-params">
396        <strong>Parameters:</strong>
397        <ul><li><code>actionName</code> : String/Object<div class="sub-desc">The name of the predefined action type,
398or instance of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> to perform.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) The options to pass to the <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a>.
399All of the config options listed below are supported by both the submit
400and load actions unless otherwise noted (custom actions could also accept
401other config options):<ul>
402<li><b>url</b> : String<p style="margin-left:1em">The url for the action (defaults
403to the form's url.)</p></li>
404<li><b>method</b> : String<p style="margin-left:1em">The form method to use (defaults
405to the form's method, or POST if not defined)</p></li>
406<li><b>params</b> : String/Object<p style="margin-left:1em">The params to pass
407(defaults to the form's baseParams, or none if not defined)</p></li>
408<li><b>headers</b> : Object<p style="margin-left:1em">Request headers to set for the action
409(defaults to the form's default headers)</p></li>
410<li><b>success</b> : Function<p style="margin-left:1em">The callback that will
411be invoked after a successful response. The function is passed the following parameters:<ul>
412<li><code>form</code> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
413<li><code>action</code> : Ext.form.Action<div class="sub-desc">The <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Action</a> object which performed the operation. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a>
414property of this object may be examined to perform custom postprocessing.</div></li>
415</ul></p></li>
416<li><b>failure</b> : Function<p style="margin-left:1em">The callback that will
417be invoked after a failed transaction attempt. The function
418is passed the following parameters:<ul>
419<li><code>form</code> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li>
420<li><code>action</code> : Ext.form.Action<div class="sub-desc">The <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Action</a> object which performed the operation. If an Ajax
421error 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>
422property of this object may be examined to perform custom postprocessing.</div></li>
423</ul></p></li>
424<li><b>scope</b> : Object<p style="margin-left:1em">The scope in which to call the
425callback functions (The <tt>this</tt> reference for the callback functions).</p></li>
426<li><b>clientValidation</b> : Boolean<p style="margin-left:1em">Submit Action only.
427Determines whether a Form's fields are validated in a final call to
428<a ext:cls="Ext.form.BasicForm" ext:member="isValid" href="output/Ext.form.BasicForm.html#isValid">isValid</a> prior to submission. Set to <tt>false</tt>
429to prevent this. If undefined, pre-submission field validation is performed.</p></li></ul></div></li>        </ul>
430        <strong>Returns:</strong>
431        <ul>
432            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
433        </ul>
434    </div>
435                </div>
436                        </div>
437        </td>
438        <td class="msource">BasicForm</td>
439    </tr>
440        <tr class="method-row expandable">
441        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
442        <td class="sig">
443        <a id="Ext.form.BasicForm-findField"></a>
444            <b>findField</b>(&nbsp;<code>String id</code>&nbsp;) : Field            <div class="mdesc">
445                        <div class="short">Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.</div>
446            <div class="long">
447                Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.    <div class="mdetail-params">
448        <strong>Parameters:</strong>
449        <ul><li><code>id</code> : String<div class="sub-desc">The value to search for</div></li>        </ul>
450        <strong>Returns:</strong>
451        <ul>
452            <li><code>Field</code></li>
453        </ul>
454    </div>
455                </div>
456                        </div>
457        </td>
458        <td class="msource">BasicForm</td>
459    </tr>
460        <tr class="method-row inherited alt expandable">
461        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
462        <td class="sig">
463        <a id="Ext.form.BasicForm-fireEvent"></a>
464            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
465                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
466            <div class="long">
467                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
468        <strong>Parameters:</strong>
469        <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li>        </ul>
470        <strong>Returns:</strong>
471        <ul>
472            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
473        </ul>
474    </div>
475                </div>
476                        </div>
477        </td>
478        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
479    </tr>
480        <tr class="method-row expandable">
481        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
482        <td class="sig">
483        <a id="Ext.form.BasicForm-getEl"></a>
484            <b>getEl</b>() : Ext.Element            <div class="mdesc">
485                        <div class="short">Get the HTML form Element</div>
486            <div class="long">
487                Get the HTML form Element    <div class="mdetail-params">
488        <strong>Parameters:</strong>
489        <ul><li>None.</li>        </ul>
490        <strong>Returns:</strong>
491        <ul>
492            <li><code>Ext.Element</code></li>
493        </ul>
494    </div>
495                </div>
496                        </div>
497        </td>
498        <td class="msource">BasicForm</td>
499    </tr>
500        <tr class="method-row alt expandable">
501        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
502        <td class="sig">
503        <a id="Ext.form.BasicForm-getValues"></a>
504            <b>getValues</b>(&nbsp;<span class="optional" title="Optional">[<code>Boolean asString</code>]</span>&nbsp;) : String/Object            <div class="mdesc">
505                        <div class="short">Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form su...</div>
506            <div class="long">
507                <p>Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
508If multiple fields exist with the same name they are returned as an array.</p>
509<p><b>Note:</b> The values are collected from all enabled HTML input elements within the form, <u>not</u> from
510the Ext Field objects. This means that all returned values are Strings (or Arrays of Strings) and that the the
511value can potentionally be the emptyText of a field.</p>    <div class="mdetail-params">
512        <strong>Parameters:</strong>
513        <ul><li><code>asString</code> : Boolean<div class="sub-desc">(optional) false to return the values as an object (defaults to returning as a string)</div></li>        </ul>
514        <strong>Returns:</strong>
515        <ul>
516            <li><code>String/Object</code></li>
517        </ul>
518    </div>
519                </div>
520                        </div>
521        </td>
522        <td class="msource">BasicForm</td>
523    </tr>
524        <tr class="method-row inherited expandable">
525        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
526        <td class="sig">
527        <a id="Ext.form.BasicForm-hasListener"></a>
528            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
529                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
530            <div class="long">
531                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
532        <strong>Parameters:</strong>
533        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
534        <strong>Returns:</strong>
535        <ul>
536            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
537        </ul>
538    </div>
539                </div>
540                        </div>
541        </td>
542        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
543    </tr>
544        <tr class="method-row alt expandable">
545        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
546        <td class="sig">
547        <a id="Ext.form.BasicForm-isDirty"></a>
548            <b>isDirty</b>() : Boolean            <div class="mdesc">
549                        <div class="short">Returns true if any fields in this form have changed since their original load.</div>
550            <div class="long">
551                Returns true if any fields in this form have changed since their original load.    <div class="mdetail-params">
552        <strong>Parameters:</strong>
553        <ul><li>None.</li>        </ul>
554        <strong>Returns:</strong>
555        <ul>
556            <li><code>Boolean</code></li>
557        </ul>
558    </div>
559                </div>
560                        </div>
561        </td>
562        <td class="msource">BasicForm</td>
563    </tr>
564        <tr class="method-row expandable">
565        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
566        <td class="sig">
567        <a id="Ext.form.BasicForm-isValid"></a>
568            <b>isValid</b>() : Boolean            <div class="mdesc">
569                        <div class="short">Returns true if client-side validation on the form is successful.</div>
570            <div class="long">
571                Returns true if client-side validation on the form is successful.    <div class="mdetail-params">
572        <strong>Parameters:</strong>
573        <ul><li>None.</li>        </ul>
574        <strong>Returns:</strong>
575        <ul>
576            <li><code>Boolean</code></li>
577        </ul>
578    </div>
579                </div>
580                        </div>
581        </td>
582        <td class="msource">BasicForm</td>
583    </tr>
584        <tr class="method-row alt expandable">
585        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
586        <td class="sig">
587        <a id="Ext.form.BasicForm-load"></a>
588            <b>load</b>(&nbsp;<code>Object options</code>&nbsp;) : BasicForm            <div class="mdesc">
589                        <div class="short">Shortcut to do a load action.</div>
590            <div class="long">
591                Shortcut to do a load action.    <div class="mdetail-params">
592        <strong>Parameters:</strong>
593        <ul><li><code>options</code> : Object<div class="sub-desc">The options to pass to the action (see <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a> for details)</div></li>        </ul>
594        <strong>Returns:</strong>
595        <ul>
596            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
597        </ul>
598    </div>
599                </div>
600                        </div>
601        </td>
602        <td class="msource">BasicForm</td>
603    </tr>
604        <tr class="method-row expandable">
605        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
606        <td class="sig">
607        <a id="Ext.form.BasicForm-loadRecord"></a>
608            <b>loadRecord</b>(&nbsp;<code>Record record</code>&nbsp;) : BasicForm            <div class="mdesc">
609                        <div class="short">Loads an Ext.data.Record into this form.</div>
610            <div class="long">
611                Loads an Ext.data.Record into this form.    <div class="mdetail-params">
612        <strong>Parameters:</strong>
613        <ul><li><code>record</code> : Record<div class="sub-desc">The record to load</div></li>        </ul>
614        <strong>Returns:</strong>
615        <ul>
616            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
617        </ul>
618    </div>
619                </div>
620                        </div>
621        </td>
622        <td class="msource">BasicForm</td>
623    </tr>
624        <tr class="method-row alt expandable">
625        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
626        <td class="sig">
627        <a id="Ext.form.BasicForm-markInvalid"></a>
628            <b>markInvalid</b>(&nbsp;<code>Array/Object errors</code>&nbsp;) : BasicForm            <div class="mdesc">
629                        <div class="short">Mark fields in this form invalid in bulk.</div>
630            <div class="long">
631                Mark fields in this form invalid in bulk.    <div class="mdetail-params">
632        <strong>Parameters:</strong>
633        <ul><li><code>errors</code> : Array/Object<div class="sub-desc">Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}</div></li>        </ul>
634        <strong>Returns:</strong>
635        <ul>
636            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
637        </ul>
638    </div>
639                </div>
640                        </div>
641        </td>
642        <td class="msource">BasicForm</td>
643    </tr>
644        <tr class="method-row inherited expandable">
645        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
646        <td class="sig">
647        <a id="Ext.form.BasicForm-on"></a>
648            <b>on</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
649                        <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
650            <div class="long">
651                Appends an event handler to this element (shorthand for addListener)    <div class="mdetail-params">
652        <strong>Parameters:</strong>
653        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
654function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li>        </ul>
655        <strong>Returns:</strong>
656        <ul>
657            <li><code>void</code></li>
658        </ul>
659    </div>
660                </div>
661                        </div>
662        </td>
663        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
664    </tr>
665        <tr class="method-row inherited alt expandable">
666        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
667        <td class="sig">
668        <a id="Ext.form.BasicForm-purgeListeners"></a>
669            <b>purgeListeners</b>() : void            <div class="mdesc">
670                        <div class="short">Removes all listeners for this object</div>
671            <div class="long">
672                Removes all listeners for this object    <div class="mdetail-params">
673        <strong>Parameters:</strong>
674        <ul><li>None.</li>        </ul>
675        <strong>Returns:</strong>
676        <ul>
677            <li><code>void</code></li>
678        </ul>
679    </div>
680                </div>
681                        </div>
682        </td>
683        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
684    </tr>
685        <tr class="method-row inherited expandable">
686        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
687        <td class="sig">
688        <a id="Ext.form.BasicForm-relayEvents"></a>
689            <b>relayEvents</b>(&nbsp;<code>Object o</code>, <code>Array events</code>&nbsp;) : void            <div class="mdesc">
690                        <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
691            <div class="long">
692                Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.    <div class="mdetail-params">
693        <strong>Parameters:</strong>
694        <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li>        </ul>
695        <strong>Returns:</strong>
696        <ul>
697            <li><code>void</code></li>
698        </ul>
699    </div>
700                </div>
701                        </div>
702        </td>
703        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
704    </tr>
705        <tr class="method-row alt expandable">
706        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
707        <td class="sig">
708        <a id="Ext.form.BasicForm-remove"></a>
709            <b>remove</b>(&nbsp;<code>Field field</code>&nbsp;) : BasicForm            <div class="mdesc">
710                        <div class="short">Removes a field from the items collection (does NOT remove its markup).</div>
711            <div class="long">
712                Removes a field from the items collection (does NOT remove its markup).    <div class="mdetail-params">
713        <strong>Parameters:</strong>
714        <ul><li><code>field</code> : Field<div class="sub-desc"></div></li>        </ul>
715        <strong>Returns:</strong>
716        <ul>
717            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
718        </ul>
719    </div>
720                </div>
721                        </div>
722        </td>
723        <td class="msource">BasicForm</td>
724    </tr>
725        <tr class="method-row inherited expandable">
726        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
727        <td class="sig">
728        <a id="Ext.form.BasicForm-removeListener"></a>
729            <b>removeListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
730                        <div class="short">Removes a listener</div>
731            <div class="long">
732                Removes a listener    <div class="mdetail-params">
733        <strong>Parameters:</strong>
734        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
735        <strong>Returns:</strong>
736        <ul>
737            <li><code>void</code></li>
738        </ul>
739    </div>
740                </div>
741                        </div>
742        </td>
743        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
744    </tr>
745        <tr class="method-row alt expandable">
746        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
747        <td class="sig">
748        <a id="Ext.form.BasicForm-render"></a>
749            <b>render</b>() : BasicForm            <div class="mdesc">
750                        <div class="short">Iterates through the Fields which have been added to this BasicForm,
751checks them for an id attribute, and calls Ext.f...</div>
752            <div class="long">
753                Iterates through the <a ext:cls="Ext.form.Field" href="output/Ext.form.Field.html">Field</a>s which have been <a ext:cls="Ext.form.BasicForm" ext:member="add" href="output/Ext.form.BasicForm.html#add">add</a>ed to this BasicForm,
754checks them for an id attribute, and calls <a ext:cls="Ext.form.Field" ext:member="applyToMarkup" href="output/Ext.form.Field.html#applyToMarkup">Ext.form.Field.applyToMarkup</a> on the existing dom element with that id.    <div class="mdetail-params">
755        <strong>Parameters:</strong>
756        <ul><li>None.</li>        </ul>
757        <strong>Returns:</strong>
758        <ul>
759            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
760        </ul>
761    </div>
762                </div>
763                        </div>
764        </td>
765        <td class="msource">BasicForm</td>
766    </tr>
767        <tr class="method-row expandable">
768        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
769        <td class="sig">
770        <a id="Ext.form.BasicForm-reset"></a>
771            <b>reset</b>() : BasicForm            <div class="mdesc">
772                        <div class="short">Resets this form.</div>
773            <div class="long">
774                Resets this form.    <div class="mdetail-params">
775        <strong>Parameters:</strong>
776        <ul><li>None.</li>        </ul>
777        <strong>Returns:</strong>
778        <ul>
779            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
780        </ul>
781    </div>
782                </div>
783                        </div>
784        </td>
785        <td class="msource">BasicForm</td>
786    </tr>
787        <tr class="method-row inherited alt expandable">
788        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
789        <td class="sig">
790        <a id="Ext.form.BasicForm-resumeEvents"></a>
791            <b>resumeEvents</b>() : void            <div class="mdesc">
792                        <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
793            <div class="long">
794                Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)    <div class="mdetail-params">
795        <strong>Parameters:</strong>
796        <ul><li>None.</li>        </ul>
797        <strong>Returns:</strong>
798        <ul>
799            <li><code>void</code></li>
800        </ul>
801    </div>
802                </div>
803                        </div>
804        </td>
805        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
806    </tr>
807        <tr class="method-row expandable">
808        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
809        <td class="sig">
810        <a id="Ext.form.BasicForm-setValues"></a>
811            <b>setValues</b>(&nbsp;<code>Array/Object values</code>&nbsp;) : BasicForm            <div class="mdesc">
812                        <div class="short">Set values for fields in this form in bulk.</div>
813            <div class="long">
814                Set values for fields in this form in bulk.    <div class="mdetail-params">
815        <strong>Parameters:</strong>
816        <ul><li><code>values</code> : Array/Object<div class="sub-desc">Either an array in the form:<br><br><code><pre>[{id:'clientName', value:'Fred. Olsen Lines'},
817 {id:'portOfLoading', value:'FXT'},
818 {id:'portOfDischarge', value:'OSL'} ]</pre></code><br><br>
819or an object hash of the form:<br><br><code><pre>{
820    clientName: 'Fred. Olsen Lines',
821    portOfLoading: 'FXT',
822    portOfDischarge: 'OSL'
823}</pre></code><br></div></li>        </ul>
824        <strong>Returns:</strong>
825        <ul>
826            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
827        </ul>
828    </div>
829                </div>
830                        </div>
831        </td>
832        <td class="msource">BasicForm</td>
833    </tr>
834        <tr class="method-row alt expandable">
835        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
836        <td class="sig">
837        <a id="Ext.form.BasicForm-submit"></a>
838            <b>submit</b>(&nbsp;<code>Object options</code>&nbsp;) : BasicForm            <div class="mdesc">
839                        <div class="short">Shortcut to do a submit action.</div>
840            <div class="long">
841                Shortcut to do a submit action.    <div class="mdetail-params">
842        <strong>Parameters:</strong>
843        <ul><li><code>options</code> : Object<div class="sub-desc">The options to pass to the action (see <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a> for details).<br>
844<p><b>Note:</b> this is ignored when using the <a ext:cls="Ext.form.BasicForm" ext:member="standardSubmit" href="output/Ext.form.BasicForm.html#standardSubmit">standardSubmit</a> option.</p>
845<p>The following code:</p><pre><code>myFormPanel.getForm().submit({
846    clientValidation: true,
847    url: <em>'updateConsignment.php'</em>,
848    params: {
849        newStatus: <em>'delivered'</em>
850    },
851    success: <b>function</b>(form, action) {
852       Ext.Msg.alert(<em>"Success"</em>, action.result.msg);
853    },
854    failure: <b>function</b>(form, action) {
855        <b>switch</b> (action.failureType) {
856            <b>case</b> Ext.form.Action.CLIENT_INVALID:
857                Ext.Msg.alert(<em>"Failure"</em>, <em>"Form fields may not be submitted <b>with</b> invalid values"</em>);
858                <b>break</b>;
859            <b>case</b> Ext.form.Action.CONNECT_FAILURE:
860                Ext.Msg.alert(<em>"Failure"</em>, <em>"Ajax communication failed"</em>);
861                <b>break</b>;
862            <b>case</b> Ext.form.Action.SERVER_INVALID:
863               Ext.Msg.alert(<em>"Failure"</em>, action.result.msg);
864       }
865    }
866});</code></pre>
867would process the following server response for a successful submission:<pre><code>{
868    success: true,
869    msg: <em>'Consignment updated'</em>
870}</code></pre>
871and the following server response for a failed submission:<pre><code>{
872    success: false,
873    msg: <em>'You <b>do</b> not have permission to perform <b>this</b> operation'</em>
874}</code></pre></div></li>        </ul>
875        <strong>Returns:</strong>
876        <ul>
877            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
878        </ul>
879    </div>
880                </div>
881                        </div>
882        </td>
883        <td class="msource">BasicForm</td>
884    </tr>
885        <tr class="method-row inherited expandable">
886        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
887        <td class="sig">
888        <a id="Ext.form.BasicForm-suspendEvents"></a>
889            <b>suspendEvents</b>() : void            <div class="mdesc">
890                        <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
891            <div class="long">
892                Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)    <div class="mdetail-params">
893        <strong>Parameters:</strong>
894        <ul><li>None.</li>        </ul>
895        <strong>Returns:</strong>
896        <ul>
897            <li><code>void</code></li>
898        </ul>
899    </div>
900                </div>
901                        </div>
902        </td>
903        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
904    </tr>
905        <tr class="method-row inherited alt expandable">
906        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
907        <td class="sig">
908        <a id="Ext.form.BasicForm-un"></a>
909            <b>un</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
910                        <div class="short">Removes a listener (shorthand for removeListener)</div>
911            <div class="long">
912                Removes a listener (shorthand for removeListener)    <div class="mdetail-params">
913        <strong>Parameters:</strong>
914        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
915        <strong>Returns:</strong>
916        <ul>
917            <li><code>void</code></li>
918        </ul>
919    </div>
920                </div>
921                        </div>
922        </td>
923        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
924    </tr>
925        <tr class="method-row expandable">
926        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
927        <td class="sig">
928        <a id="Ext.form.BasicForm-updateRecord"></a>
929            <b>updateRecord</b>(&nbsp;<code>Record record</code>&nbsp;) : BasicForm            <div class="mdesc">
930                        <div class="short">Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block.</div>
931            <div class="long">
932                Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block.    <div class="mdetail-params">
933        <strong>Parameters:</strong>
934        <ul><li><code>record</code> : Record<div class="sub-desc">The record to edit</div></li>        </ul>
935        <strong>Returns:</strong>
936        <ul>
937            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
938        </ul>
939    </div>
940                </div>
941                        </div>
942        </td>
943        <td class="msource">BasicForm</td>
944    </tr>
945            </table>
946                <a id="Ext.form.BasicForm-events"></a>
947        <h2>Public Events</h2>
948                <table cellspacing="0" class="member-table">
949            <tr>
950                <th class="sig-header" colspan="2">Event</th>
951                <th class="msource-header">Defined By</th>
952            </tr>
953                <tr class="event-row expandable">
954        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
955        <td class="sig">
956        <a id="Ext.form.BasicForm-actioncomplete"></a>
957            <b>actioncomplete</b> : (&nbsp;<code>Form this</code>, <code>Action action</code>&nbsp;)            <div class="mdesc">
958                        <div class="short">Fires when an action is completed.</div>
959            <div class="long">
960                Fires when an action is completed.    <div class="mdetail-params">
961        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
962        <ul><li><code>this</code> : Form<div class="sub-desc"></div></li><li><code>action</code> : Action<div class="sub-desc">The <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> that completed</div></li>        </ul>
963    </div>
964                </div>
965                        </div>
966        </td>
967        <td class="msource">BasicForm</td>
968    </tr>
969        <tr class="event-row alt expandable">
970        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
971        <td class="sig">
972        <a id="Ext.form.BasicForm-actionfailed"></a>
973            <b>actionfailed</b> : (&nbsp;<code>Form this</code>, <code>Action action</code>&nbsp;)            <div class="mdesc">
974                        <div class="short">Fires when an action fails.</div>
975            <div class="long">
976                Fires when an action fails.    <div class="mdetail-params">
977        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
978        <ul><li><code>this</code> : Form<div class="sub-desc"></div></li><li><code>action</code> : Action<div class="sub-desc">The <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> that failed</div></li>        </ul>
979    </div>
980                </div>
981                        </div>
982        </td>
983        <td class="msource">BasicForm</td>
984    </tr>
985        <tr class="event-row expandable">
986        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
987        <td class="sig">
988        <a id="Ext.form.BasicForm-beforeaction"></a>
989            <b>beforeaction</b> : (&nbsp;<code>Form this</code>, <code>Action action</code>&nbsp;)            <div class="mdesc">
990                        <div class="short">Fires before any action is performed. Return false to cancel the action.</div>
991            <div class="long">
992                Fires before any action is performed. Return false to cancel the action.    <div class="mdetail-params">
993        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
994        <ul><li><code>this</code> : Form<div class="sub-desc"></div></li><li><code>action</code> : Action<div class="sub-desc">The <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> to be performed</div></li>        </ul>
995    </div>
996                </div>
997                        </div>
998        </td>
999        <td class="msource">BasicForm</td>
1000    </tr>
1001            </table>
1002       
1003        </div>
Note: See TracBrowser for help on using the repository browser.