Upgrade to ExtJS 3.2.0 - Released 03/30/2010
[extjs.git] / docs / output / Ext.History.html
index 6ee244c..49c2597 100644 (file)
@@ -1,6 +1,6 @@
-<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">History</pre></div><h1>Class <a href="source/History.html#cls-Ext.History">Ext.History</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">History.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/History.html#cls-Ext.History">History</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">History management component that allows you to register arbitrary tokens that signify application\r
-history state on navigation actions.  You can then handle the history <a href="output/Ext.History.html#Ext.History-change" ext:member="change" ext:cls="Ext.History">change</a> event in order\r
-to reset your application UI to the appropriate state when the user navigates forward or backward through\r
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.History-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.History-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.History-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.History-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.History"><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">History</pre></div><h1>Class <a href="source/History.html#cls-Ext.History">Ext.History</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/History.html#cls-Ext.History">History.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/History.html#cls-Ext.History">History</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">History management component that allows you to register arbitrary tokens that signify application
+history state on navigation actions.  You can then handle the history <a href="output/Ext.History.html#Ext.History-change" ext:member="change" ext:cls="Ext.History">change</a> event in order
+to reset your application UI to the appropriate state when the user navigates forward or backward through
 the browser history stack.<br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.History-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this
 object during initialization.  This should ...</div><div class="long"><p>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
@@ -58,15 +58,15 @@ Ext.DomObserver = Ext.extend(Object, {
     triggerAction: <em>'all'</em>
 });</code></pre></p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr></tbody></table><a id="Ext.History-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.History-fieldId"></a><b><a href="source/History.html#prop-Ext.History-fieldId">fieldId</a></b> : String<div class="mdesc">The id of the hidden field required for storing the current history token.</div></td><td class="msource">History</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.History-iframeId"></a><b><a href="source/History.html#prop-Ext.History-iframeId">iframeId</a></b> : String<div class="mdesc">The id of the iframe required by IE to manage the history stack.</div></td><td class="msource">History</td></tr></tbody></table><a id="Ext.History-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.History-add"></a><b><a href="source/History.html#method-Ext.History-add">add</a></b>(&nbsp;<code>String&nbsp;token</code>,&nbsp;<code>Boolean&nbsp;preventDuplicates</code>&nbsp;)
     :
-                                        void<div class="mdesc"><div class="short">Add a new token to the history stack. This can be any arbitrary value, although it would&#13;
-commonly be the concatenati...</div><div class="long">Add a new token to the history stack. This can be any arbitrary value, although it would\r
-commonly be the concatenation of a component id and another id marking the specifc history\r
-state of that component.  Example usage:\r
-<pre><code><i>// Handle tab changes on a TabPanel\r</i>
-tabPanel.on(<em>'tabchange'</em>, <b>function</b>(tabPanel, tab){\r
-    Ext.History.add(tabPanel.id + <em>':'</em> + tab.id);\r
-});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>token</code> : String<div class="sub-desc">The value that defines a particular application-specific history state</div></li><li><code>preventDuplicates</code> : Boolean<div class="sub-desc">When true, if the passed token matches the current token\r
-it will not save a new history step. Set to false if the same state can be saved more than once\r
+                                        void<div class="mdesc"><div class="short">Add a new token to the history stack. This can be any arbitrary value, although it would
+commonly be the concatenatio...</div><div class="long">Add a new token to the history stack. This can be any arbitrary value, although it would
+commonly be the concatenation of a component id and another id marking the specifc history
+state of that component.  Example usage:
+<pre><code><i>// Handle tab changes on a TabPanel</i>
+tabPanel.on(<em>'tabchange'</em>, <b>function</b>(tabPanel, tab){
+    Ext.History.add(tabPanel.id + <em>':'</em> + tab.id);
+});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>token</code> : String<div class="sub-desc">The value that defines a particular application-specific history state</div></li><li><code>preventDuplicates</code> : Boolean<div class="sub-desc">When true, if the passed token matches the current token
+it will not save a new history step. Set to false if the same state can be saved more than once
 at the same history stack location (defaults to true).</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">History</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-addEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addEvents">addEvents</a></b>(&nbsp;<code>Object|String&nbsp;o</code>,&nbsp;<code>string&nbsp;Optional.</code>&nbsp;)
     :
                                         void<div class="mdesc"><div class="short">Adds the specified events to the list of events which this Observable may fire.</div><div class="long">Adds the specified events to the list of events which this Observable may fire.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Object|String<div class="sub-desc">Either an object with event names as properties with a value of <code>true</code>
@@ -126,38 +126,38 @@ Or a shorthand syntax:<br>
     :
                                         void<div class="mdesc"><div class="short">Programmatically steps back one step in browser history (equivalent to the user pressing the Back button).</div><div class="long">Programmatically steps back one step in browser history (equivalent to the user pressing the Back button).<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">History</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;)
     :
-                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling&#13;
-this.getBubbleTarget() if present...</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling\r
-<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>\r
-<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default\r
-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&#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&#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
-        <b>return</b> this.formPanel;\r
-    }\r
-});\r
-\r
-<b>var</b> myForm = <b>new</b> Ext.formPanel({\r
-    title: <em>'User Details'</em>,\r
-    items: [{\r
-        ...\r
-    }],\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
-        }\r
-    }\r
+                                        void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
+<code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
+<p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="output/Ext.Component.getBubbleTarget.html" ext:cls="Ext.Component.getBubbleTarget">Ext.Component.getBubbleTarget</a>. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.</p>
+<p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
+    <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
+    initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {
+        this.enableBubble(<em>'change'</em>);
+    }),
+
+    <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
+    getBubbleTarget : <b>function</b>() {
+        <b>if</b> (!this.formPanel) {
+            this.formPanel = this.findParentByType(<em>'form'</em>);
+        }
+        <b>return</b> this.formPanel;
+    }
+});
+
+<b>var</b> myForm = <b>new</b> Ext.formPanel({
+    title: <em>'User Details'</em>,
+    items: [{
+        ...
+    }],
+    listeners: {
+        change: <b>function</b>() {
+            <i>// Title goes red <b>if</b> form has been modified.</i>
+            myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
+        }
+    }
 });</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 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;)
     :
                                         Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
@@ -171,7 +171,7 @@ by calling <a href="output/Ext.util.Observable.html#Ext.util.Observable-enableBu
     :
                                         Boolean<div class="mdesc"><div class="short">Checks to see if this object has any listeners for a specified event</div><div class="long">Checks to see if this object has any listeners for a specified event<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#hasListener" ext:member="#hasListener" 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.History-init"></a><b><a href="source/History.html#method-Ext.History-init">init</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;onReady</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>&nbsp;)
     :
-                                        void<div class="mdesc"><div class="short">Initialize the global History instance.</div><div class="long">Initialize the global History instance.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>onReady</code> : Boolean<div class="sub-desc">(optional) A callback function that will be called once the history\r
+                                        void<div class="mdesc"><div class="short">Initialize the global History instance.</div><div class="long">Initialize the global History instance.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>onReady</code> : Boolean<div class="sub-desc">(optional) A callback function that will be called once the history
 component is fully initialized.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code> reference) in which the callback is executed. Defaults to the browser window.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">History</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-on"></a><b><a href="source/Observable.html#method-Ext.util.Observable-on">on</a></b>(&nbsp;<code>String&nbsp;eventName</code>,&nbsp;<code>Function&nbsp;handler</code>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;scope</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;options</code>]</span>&nbsp;)
     :
                                         void<div class="mdesc"><div class="short">Appends an event handler to this object (shorthand for addListener.)</div><div class="long">Appends an event handler to this object (shorthand for <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a>.)<div class="mdetail-params"><strong>Parameters:</strong><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 (<code><b>this</b></code> reference) in which the handler function is executed.