Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / output / Ext.form.BasicForm.html
index b7c0526..9714b77 100644 (file)
@@ -1,4 +1,4 @@
-<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.form.BasicForm-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.form.BasicForm-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.form.BasicForm-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.form.BasicForm-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.form.BasicForm"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif">BasicForm</pre></div><h1>Class <a href="source/BasicForm.html#cls-Ext.form.BasicForm">Ext.form.BasicForm</a></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">BasicForm.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/BasicForm.html#cls-Ext.form.BasicForm">BasicForm</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr><tr><td class="hd-info"></td></tr></table><div class="description"><p>Encapsulates the DOM &lt;form> element at the heart of the <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">FormPanel</a> class, and provides
+<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a>&#13;&nbsp;&nbsp;<img src="resources/elbow-end.gif">BasicForm</pre></div><h1>Class <a href="source/BasicForm.html#cls-Ext.form.BasicForm">Ext.form.BasicForm</a></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">BasicForm.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/BasicForm.html#cls-Ext.form.BasicForm">BasicForm</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr></table><div class="description"><p>Encapsulates the DOM &lt;form> element at the heart of the <a href="output/Ext.form.FormPanel.html" ext:cls="Ext.form.FormPanel">FormPanel</a> class, and provides
 input field management, validation, submission, and form loading services.</p>
 <p>By default, Ext Forms are submitted through Ajax, using an instance of <a href="output/Ext.form.Action.Submit.html" ext:cls="Ext.form.Action.Submit">Ext.form.Action.Submit</a>.
 To enable normal browser submission of an Ext Form, use the <a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-standardSubmit" ext:member="standardSubmit" ext:cls="Ext.form.BasicForm">standardSubmit</a> config option.</p>
@@ -188,7 +188,7 @@ to submit extra data, for example:</p>
 });</code></pre></div></div></td><td class="msource">BasicForm</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-timeout"></a><b><a href="source/BasicForm.html#cfg-Ext.form.BasicForm-timeout">timeout</a></b> : Number<div class="mdesc">Timeout for form actions in seconds (default is 30 seconds).</div></td><td class="msource">BasicForm</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-trackResetOnLoad"></a><b><a href="source/BasicForm.html#cfg-Ext.form.BasicForm-trackResetOnLoad">trackResetOnLoad</a></b> : Boolean<div class="mdesc"><div class="short">If set to true, reset() resets to the last loaded\r
 or setValues() data instead of when the form was first created.  De...</div><div class="long">If set to <tt>true</tt>, <a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-reset" ext:member="reset" ext:cls="Ext.form.BasicForm">reset</a>() resets to the last loaded
 or <a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-setValues" ext:member="setValues" ext:cls="Ext.form.BasicForm">setValues</a>() data instead of when the form was first created.  Defaults to <tt>false</tt>.</div></div></td><td class="msource">BasicForm</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-url"></a><b><a href="source/BasicForm.html#cfg-Ext.form.BasicForm-url">url</a></b> : String<div class="mdesc">The URL to use for form actions if one isn't supplied in the
-<code><a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-doAction" ext:member="doAction" ext:cls="Ext.form.BasicForm">doAction</a> options</code>.</div></td><td class="msource">BasicForm</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-waitTitle"></a><b><a href="source/BasicForm.html#cfg-Ext.form.BasicForm-waitTitle">waitTitle</a></b> : String<div class="mdesc">The default title to show for the waiting message box (defaults to <tt>'Please Wait...'</tt>)</div></td><td class="msource">BasicForm</td></tr></tbody></table><a id="Ext.form.BasicForm-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-items"></a><b><a href="source/BasicForm.html#prop-Ext.form.BasicForm-items">items</a></b> : MixedCollection<div class="mdesc">A Ext.util.MixedCollection MixedCollection) containing all the Ext.form.Fields in this form.</div></td><td class="msource">BasicForm</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-waitMsgTarget"></a><b><a href="source/BasicForm.html#prop-Ext.form.BasicForm-waitMsgTarget">waitMsgTarget</a></b> : Mixed<div class="mdesc"><div class="short">By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific\r
+<code><a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-doAction" ext:member="doAction" ext:cls="Ext.form.BasicForm">doAction</a> options</code>.</div></td><td class="msource">BasicForm</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-waitTitle"></a><b><a href="source/BasicForm.html#cfg-Ext.form.BasicForm-waitTitle">waitTitle</a></b> : String<div class="mdesc">The default title to show for the waiting message box (defaults to <tt>'Please Wait...'</tt>)</div></td><td class="msource">BasicForm</td></tr></tbody></table><a id="Ext.form.BasicForm-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-items"></a><b><a href="source/BasicForm.html#prop-Ext.form.BasicForm-items">items</a></b> : MixedCollection<div class="mdesc">A <a href="output/Ext.util.MixedCollection.html" ext:cls="Ext.util.MixedCollection">MixedCollection</a> containing all the Ext.form.Fields in this form.</div></td><td class="msource">BasicForm</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-waitMsgTarget"></a><b><a href="source/BasicForm.html#prop-Ext.form.BasicForm-waitMsgTarget">waitMsgTarget</a></b> : Mixed<div class="mdesc"><div class="short">By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific\r
 element by passing it or i...</div><div class="long">By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
 element by passing it or its id or mask the form itself by passing in true.</div></div></td><td class="msource">BasicForm</td></tr></tbody></table><a id="Ext.form.BasicForm-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-BasicForm"></a><b><a href="source/BasicForm.html#cls-Ext.form.BasicForm">BasicForm</a></b>(&nbsp;<code>Mixed&nbsp;el</code>,&nbsp;<code>Object&nbsp;config</code>&nbsp;)\r
     <div class="mdesc"><div class="short"></div><div class="long"><div class="mdetail-params"><strong>Parameters:</strong><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><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-add"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-add">add</a></b>(&nbsp;<code>Field&nbsp;field1</code>,&nbsp;<span title="Optional" class="optional">[<code>Field&nbsp;field2</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Field&nbsp;etc</code>]</span>&nbsp;)\r
@@ -308,7 +308,7 @@ callback functions (The <tt>this</tt> reference for the callback functions).</di
 <li><b>clientValidation</b> : Boolean<div class="sub-desc">Submit Action only.
 Determines whether a Form's fields are validated in a final call to
 <a href="output/Ext.form.BasicForm.html#Ext.form.BasicForm-isValid" ext:member="isValid" ext:cls="Ext.form.BasicForm">isValid</a> prior to submission. Set to <tt>false</tt>
-to prevent this. If undefined, pre-submission field validation is performed.</div></li></ul></div></li></ul><strong>Returns:</strong><ul><li><code>BasicForm</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>Object&nbsp;events</code>&nbsp;)\r
+to prevent this. If undefined, pre-submission field validation is performed.</div></li></ul></div></li></ul><strong>Returns:</strong><ul><li><code>BasicForm</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-enableBubble"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-enableBubble">enableBubble</a></b>(&nbsp;<code>String/Array&nbsp;events</code>&nbsp;)\r
     :\r
                                         void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling&#13;\r
 this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\r
@@ -317,13 +317,13 @@ this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fi
 implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\r
 access the required target more quickly.</p>\r
 <p>Example:</p><pre><code>Ext.override(Ext.form.Field, {\r
-<i>//  Add functionality to Field<em>'s initComponent to enable the change event to bubble\r</i>
-    initComponent: Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
-        this.enableBubble('</em>change<em>');\r
+    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble\r</i>
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {\r
+        this.enableBubble(<em>'change'</em>);\r
     }),\r
 \r
-<i>//  We know that we want Field'</em>s events to bubble directly to the FormPanel.\r</i>
-    getBubbleTarget: <b>function</b>() {\r
+    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.\r</i>
+    getBubbleTarget : <b>function</b>() {\r
         <b>if</b> (!this.formPanel) {\r
             this.formPanel = this.findParentByType(<em>'form'</em>);\r
         }\r
@@ -338,11 +338,11 @@ access the required target more quickly.</p>
     }],\r
     listeners: {\r
         change: <b>function</b>() {\r
-<i>//          Title goes red <b>if</b> form has been modified.\r</i>
-            myForm.header.setStyle(<em>"color"</em>, <em>"red"</em>);\r
+            <i>// Title goes red <b>if</b> form has been modified.\r</i>
+            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);\r
         }\r
     }\r
-});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : Object<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-findField"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-findField">findField</a></b>(&nbsp;<code>String&nbsp;id</code>&nbsp;)\r
+});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : String/Array<div class="sub-desc">The event name to bubble, or an Array of event names.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#enableBubble" ext:member="#enableBubble" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-findField"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-findField">findField</a></b>(&nbsp;<code>String&nbsp;id</code>&nbsp;)\r
     :\r
                                         Field<div class="mdesc"><div class="short">Find a Ext.form.Field in this form.</div><div class="long">Find a <a href="output/Ext.form.Field.html" ext:cls="Ext.form.Field">Ext.form.Field</a> in this form.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>id</code> : String<div class="sub-desc">The value to search for (specify either a <a href="output/Ext.Component.html#Ext.Component-id" ext:member="id" ext:cls="Ext.Component">id</a>,
 <a href="output/Ext.grid.Column.html#Ext.grid.Column-dataIndex" ext:member="dataIndex" ext:cls="Ext.grid.Column">dataIndex</a>, <a href="output/Ext.form.Field.html#Ext.form.Field-getName" ext:member="getName" ext:cls="Ext.form.Field">name or hiddenName</a>).</div></li></ul><strong>Returns:</strong><ul><li><code>Field</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-fireEvent"></a><b><a href="source/Observable.html#method-Ext.util.Observable-fireEvent">fireEvent</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Object...&nbsp;args</code>&nbsp;)\r
@@ -352,7 +352,11 @@ An event may be set to bubble up an Obse...</div><div class="long"><p>Fires the
 <p>An event may be set to bubble up an Observable parent hierarchy (See <a href="output/Ext.Component.html#Ext.Component-getBubbleTarget" ext:member="getBubbleTarget" ext:cls="Ext.Component">Ext.Component.getBubbleTarget</a>)
 by calling <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBubble" ext:member="enableBubble" ext:cls="Ext.util.Observable">enableBubble</a>.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to fire.</div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers.</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#fireEvent" ext:member="#fireEvent" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-getEl"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-getEl">getEl</a></b>()\r
     :\r
-                                        Ext.Element<div class="mdesc"><div class="short">Get the HTML form Element</div><div class="long">Get the HTML form Element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Element</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-getValues"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-getValues">getValues</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;asString</code>]</span>&nbsp;)\r
+                                        Ext.Element<div class="mdesc"><div class="short">Get the HTML form Element</div><div class="long">Get the HTML form Element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Element</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-getFieldValues"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-getFieldValues">getFieldValues</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;dirtyOnly</code>]</span>&nbsp;)\r
+    :\r
+                                        Object<div class="mdesc"><div class="short">Retrieves the fields in the form as a set of key/value pairs, using the getValue() method.\r
+If multiple fields exist w...</div><div class="long">Retrieves the fields in the form as a set of key/value pairs, using the <a href="output/Ext.form.Field.html#Ext.form.Field-getValue" ext:member="getValue" ext:cls="Ext.form.Field">getValue()</a> method.
+If multiple fields exist with the same name they are returned as an array.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>dirtyOnly</code> : Boolean<div class="sub-desc">(optional) True to return only fields that are dirty.</div></li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">The values in the form</div></li></ul></div></div></div></td><td class="msource">BasicForm</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.form.BasicForm-getValues"></a><b><a href="source/BasicForm.html#method-Ext.form.BasicForm-getValues">getValues</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;asString</code>]</span>&nbsp;)\r
     :\r
                                         String/Object<div class="mdesc"><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><div class="long"><p>Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit.
 If multiple fields exist with the same name they are returned as an array.</p>