Upgrade to ExtJS 3.3.0 - Released 10/06/2010
[extjs.git] / docs / output / Ext.Updater.html
1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.Updater-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.Updater-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.Updater-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.Updater-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.Updater"><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">Updater</pre></div><h1>Class <a href="source/UpdateManager.html#cls-Ext.Updater">Ext.Updater</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/UpdateManager.html#cls-Ext.Updater">UpdateManager.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/UpdateManager.html#cls-Ext.Updater">Updater</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">Provides AJAX-style update capabilities for Element objects.  Updater can be used to <a href="output/Ext.Updater.html#Ext.Updater-update" ext:member="update" ext:cls="Ext.Updater">update</a>
2 an <a href="output/Ext.Element.html" ext:cls="Ext.Element">Ext.Element</a> once, or you can use <a href="output/Ext.Updater.html#Ext.Updater-startAutoRefresh" ext:member="startAutoRefresh" ext:cls="Ext.Updater">startAutoRefresh</a> to set up an auto-updating
3 <a href="output/Ext.Element.html" ext:cls="Ext.Element">Element</a> on a specific interval.<br><br>
4 Usage:<br>
5 <pre><code><b>var</b> el = Ext.get(<em>"foo"</em>); <i>// Get Ext.Element object</i>
6 <b>var</b> mgr = el.getUpdater();
7 mgr.update({
8         url: <em>"http:<i>//myserver.com/index.php"</em>,</i>
9         params: {
10             param1: <em>"foo"</em>,
11             param2: <em>"bar"</em>
12         }
13 });
14 ...
15 mgr.formUpdate(<em>"myFormId"</em>, <em>"http:<i>//myserver.com/index.php"</em>);</i>
16 <br>
17 <i>// or directly (returns the same Updater instance)</i>
18 <b>var</b> mgr = <b>new</b> Ext.Updater(<em>"myElementId"</em>);
19 mgr.startAutoRefresh(60, <em>"http:<i>//myserver.com/index.php"</em>);</i>
20 mgr.on(<em>"update"</em>, myFcnNeedsToKnow);
21 <br>
22 <i>// short handed call directly from the element object</i>
23 Ext.get(<em>"foo"</em>).load({
24         url: <em>"bar.php"</em>,
25         scripts: true,
26         params: <em>"param1=foo&amp;param2=bar"</em>,
27         text: <em>"Loading Foo..."</em>
28 });</code></pre></div><div class="hr"></div><a id="Ext.Updater-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
29 object during initialization.  This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
30 object during initialization.  This should be a valid listeners config object as specified in the
31 <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> example for attaching multiple handlers at once.</p>
32 <br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p>
33 <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
34 is usually only done when extra value can be added. For example the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>'s
35 <b><code><a href="output/Ext.DataView.html#Ext.DataView-click" ext:member="click" ext:cls="Ext.DataView">click</a></code></b> event passing the node clicked on. To access DOM
36 events directly from a Component's HTMLElement, listeners must be added to the <i><a href="output/Ext.Component.html#Ext.Component-getEl" ext:member="getEl" ext:cls="Ext.Component">Element</a></i> after the Component
37 has been rendered. A plugin can simplify this step:<pre><code><i>// Plugin is configured <b>with</b> a listeners config object.</i>
38 <i>// The Component is appended to the argument list of all handler functions.</i>
39 Ext.DomObserver = Ext.extend(Object, {
40     constructor: <b>function</b>(config) {
41         this.listeners = config.listeners ? config.listeners : config;
42     },
43
44     <i>// Component passes itself into plugin&#39;s init method</i>
45     init: <b>function</b>(c) {
46         <b>var</b> p, l = this.listeners;
47         <b>for</b> (p <b>in</b> l) {
48             <b>if</b> (Ext.isFunction(l[p])) {
49                 l[p] = this.createHandler(l[p], c);
50             } <b>else</b> {
51                 l[p].fn = this.createHandler(l[p].fn, c);
52             }
53         }
54
55         <i>// Add the listeners to the Element immediately following the render call</i>
56         c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() {
57             <b>var</b> e = c.getEl();
58             <b>if</b> (e) {
59                 e.on(l);
60             }
61         });
62     },
63
64     createHandler: <b>function</b>(fn, c) {
65         <b>return</b> <b>function</b>(e) {
66             fn.call(this, e, c);
67         };
68     }
69 });
70
71 <b>var</b> combo = <b>new</b> Ext.form.ComboBox({
72
73     <i>// Collapse combo when its element is clicked on</i>
74     plugins: [ <b>new</b> Ext.DomObserver({
75         click: <b>function</b>(evt, comp) {
76             comp.collapse();
77         }
78     })],
79     store: myStore,
80     typeAhead: true,
81     mode: <em>'local'</em>,
82     triggerAction: <em>'all'</em>
83 });</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.Updater-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.Updater-defaultUrl"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-defaultUrl">defaultUrl</a></b> : String<div class="mdesc">Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.</div></td><td class="msource">Updater</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-disableCaching"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-disableCaching">disableCaching</a></b> : Boolean<div class="mdesc"><div class="short">Whether to append unique parameter on get request to disable caching (defaults to Ext.Updater.defaults.disableCaching...</div><div class="long">Whether to append unique parameter on get request to disable caching (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-disableCaching" ext:member="disableCaching" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.disableCaching</a>).</div></div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-el"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-el">el</a></b> : Ext.Element<div class="mdesc">The Element object</div></td><td class="msource">Updater</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-formUpdateDelegate"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-formUpdateDelegate">formUpdateDelegate</a></b> : Function<div class="mdesc"><div class="short">Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arg...</div><div class="long">Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments</div></div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-indicatorText"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-indicatorText">indicatorText</a></b> : String<div class="mdesc">Text for loading indicator (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-indicatorText" ext:member="indicatorText" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.indicatorText</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-loadScripts"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-loadScripts">loadScripts</a></b> : Boolean<div class="mdesc">True to process scripts in the output (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-loadScripts" ext:member="loadScripts" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.loadScripts</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-refreshDelegate"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-refreshDelegate">refreshDelegate</a></b> : Function<div class="mdesc">Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-renderer"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-renderer">renderer</a></b> : Object<div class="mdesc">The renderer for this Updater (defaults to <a href="output/Ext.Updater.BasicRenderer.html" ext:cls="Ext.Updater.BasicRenderer">Ext.Updater.BasicRenderer</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-showLoadIndicator"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-showLoadIndicator">showLoadIndicator</a></b> : String<div class="mdesc">Whether to show indicatorText when loading (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-showLoadIndicator" ext:member="showLoadIndicator" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.showLoadIndicator</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-sslBlankUrl"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-sslBlankUrl">sslBlankUrl</a></b> : String<div class="mdesc">Blank page URL to use with SSL file uploads (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-sslBlankUrl" ext:member="sslBlankUrl" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.sslBlankUrl</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-timeout"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-timeout">timeout</a></b> : Number<div class="mdesc">Timeout for requests or form posts in seconds (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-timeout" ext:member="timeout" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.timeout</a>).</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-transaction"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-transaction">transaction</a></b> : Object<div class="mdesc">Transaction object of the current executing transaction, or null if there is no active transaction.</div></td><td class="msource">Updater</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-updateDelegate"></a><b><a href="source/UpdateManager.html#prop-Ext.Updater-updateDelegate">updateDelegate</a></b> : Function<div class="mdesc">Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments</div></td><td class="msource">Updater</td></tr></tbody></table><a id="Ext.Updater-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.Updater-Updater"></a><b><a href="source/UpdateManager.html#cls-Ext.Updater">Updater</a></b>(&nbsp;<code>Mixed&nbsp;el</code>,&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;forceNew</code>]</span>&nbsp;)
84     <div class="mdesc"><div class="short">Create new Updater directly.</div><div class="long">Create new Updater directly.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>el</code> : Mixed<div class="sub-desc">The element to update</div></li><li><code>forceNew</code> : Boolean<div class="sub-desc">(optional) By default the constructor checks to see if the passed element already
85 has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-Updater.updateElement"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-Updater.updateElement">Updater.updateElement</a></b>(&nbsp;<code>Mixed&nbsp;el</code>,&nbsp;<code>String&nbsp;url</code>,&nbsp;<span title="Optional" class="optional">[<code>String/Object&nbsp;params</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Object&nbsp;options</code>]</span>&nbsp;)
86     :
87                                         void<div class="mdesc"><div class="short">&lt;static&gt;&nbsp;Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
88 Usage:
89 Ext.Updater.up...</div><div class="long">&lt;static&gt;&nbsp;Static convenience method. <b>This method is deprecated in favor of el.load({url:'foo.php', ...})</b>.
90 Usage:
91 <pre><code>Ext.Updater.updateElement(<em>"my-div"</em>, <em>"stuff.php"</em>);</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>el</code> : Mixed<div class="sub-desc">The element to update</div></li><li><code>url</code> : String<div class="sub-desc">The url</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) Url encoded param string or an object of name/value pairs</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) A config object with any of the Updater properties you want to set - for
92 example: {disableCaching:true, indicatorText: "Loading data..."}</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-abort"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-abort">abort</a></b>()
93     :
94                                         void<div class="mdesc"><div class="short">Aborts the currently executing transaction, if any.</div><div class="long">Aborts the currently executing transaction, if any.<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">Updater</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;)
95     :
96                                         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>
97 or the first event name string if multiple event names are being passed as separate parameters.</div></li><li><code>Optional.</code> : string<div class="sub-desc">Event name if multiple event names are being passed as separate parameters.
98 Usage:<pre><code>this.addEvents(<em>'storeloaded'</em>, <em>'storecleared'</em>);</code></pre></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#addEvents" ext:member="#addEvents" 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-addListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addListener">addListener</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;)
99     :
100                                         void<div class="mdesc"><div class="short">Appends an event handler to this object.</div><div class="long">Appends an event handler to this object.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the 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.
101 <b>If omitted, defaults to the object which fired the event.</b></div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration.
102 properties. This may contain any of the following properties:<ul>
103 <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
104 <b>If omitted, defaults to the object which fired the event.</b></div></li>
105 <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
106 <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
107 <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="output/Ext.util.DelayedTask.html" ext:cls="Ext.util.DelayedTask">Ext.util.DelayedTask</a> delayed
108 by the specified number of milliseconds. If the event fires again within that time, the original
109 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
110 <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
111 if the event was bubbled up from a child Observable.</div></li>
112 </ul><br>
113 <p>
114 <b>Combining Options</b><br>
115 Using the options argument, it is possible to combine different types of listeners:<br>
116 <br>
117 A delayed, one-time listener.
118 <pre><code>myDataView.on(<em>'click'</em>, this.onClick, this, {
119 single: true,
120 delay: 100
121 });</code></pre>
122 <p>
123 <b>Attaching multiple handlers in 1 call</b><br>
124 The method also allows for a single argument to be passed which is a config object containing properties
125 which specify multiple handlers.
126 <p>
127 <pre><code>myGridPanel.on({
128 <em>'click'</em> : {
129     fn: this.onClick,
130     scope: this,
131     delay: 100
132 },
133 <em>'mouseover'</em> : {
134     fn: this.onMouseOver,
135     scope: this
136 },
137 <em>'mouseout'</em> : {
138     fn: this.onMouseOut,
139     scope: this
140 }
141 });</code></pre>
142 <p>
143 Or a shorthand syntax:<br>
144 <pre><code>myGridPanel.on({
145 <em>'click'</em> : this.onClick,
146 <em>'mouseover'</em> : this.onMouseOver,
147 <em>'mouseout'</em> : this.onMouseOut,
148  scope: this
149 });</code></pre></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#addListener" ext:member="#addListener" 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-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;)
150     :
151                                         void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
152 this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
153 <code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
154 <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
155 implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
156 access the required target more quickly.</p>
157 <p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
158     <i>//  Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
159     initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {
160         this.enableBubble(<em>'change'</em>);
161     }),
162
163     <i>//  We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
164     getBubbleTarget : <b>function</b>() {
165         <b>if</b> (!this.formPanel) {
166             this.formPanel = this.findParentByType(<em>'form'</em>);
167         }
168         <b>return</b> this.formPanel;
169     }
170 });
171
172 <b>var</b> myForm = <b>new</b> Ext.formPanel({
173     title: <em>'User Details'</em>,
174     items: [{
175         ...
176     }],
177     listeners: {
178         change: <b>function</b>() {
179             <i>// Title goes red <b>if</b> form has been modified.</i>
180             myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
181         }
182     }
183 });</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;)
184     :
185                                         Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
186 An event may be set to bubble up an Obse...</div><div class="long"><p>Fires the specified event with the passed parameters (minus the event name).</p>
187 <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>)
188 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.Updater-formUpdate"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-formUpdate">formUpdate</a></b>(&nbsp;<code>String/HTMLElement&nbsp;form</code>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;url</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;reset</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;callback</code>]</span>&nbsp;)
189     :
190                                         void<div class="mdesc"><div class="short">Performs an asynchronous form post, updating this element with the response. If the form has the attribute
191 enctype="&lt;...</div><div class="long"><p>Performs an asynchronous form post, updating this element with the response. If the form has the attribute
192 enctype="<a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>", it assumes it's a file upload.
193 Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.</p>
194 <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
195 performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
196 DOM <code>&lt;form></code> element temporarily modified to have its
197 <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
198 to a dynamically generated, hidden <code>&lt;iframe></code> which is inserted into the document
199 but removed after the return data has been gathered.</p>
200 <p>Be aware that file upload packets, sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>
201 and some server technologies (notably JEE) may require some custom processing in order to
202 retrieve parameter names and parameter values from the packet content.</p><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>form</code> : String/HTMLElement<div class="sub-desc">The form Id or form element</div></li><li><code>url</code> : String<div class="sub-desc">(optional) The url to pass the form to. If omitted the action attribute on the form will be used.</div></li><li><code>reset</code> : Boolean<div class="sub-desc">(optional) Whether to try to reset the form after the update</div></li><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete. The following
203 parameters are passed:<ul>
204 <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
205 <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
206 <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-getDefaultRenderer"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-getDefaultRenderer">getDefaultRenderer</a></b>()
207     :
208                                         void<div class="mdesc"><div class="short">This is an overrideable method which returns a reference to a default
209 renderer class if none is specified when creati...</div><div class="long">This is an overrideable method which returns a reference to a default
210 renderer class if none is specified when creating the Ext.Updater.
211 Defaults to <a href="output/Ext.Updater.BasicRenderer.html" ext:cls="Ext.Updater.BasicRenderer">Ext.Updater.BasicRenderer</a><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">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-getEl"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-getEl">getEl</a></b>()
212     :
213                                         Ext.Element<div class="mdesc"><div class="short">Get the Element this Updater is bound to</div><div class="long">Get the Element this Updater is bound to<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">The element</div></li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-getRenderer"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-getRenderer">getRenderer</a></b>()
214     :
215                                         Object<div class="mdesc"><div class="short">Returns the current content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details.</div><div class="long">Returns the current content renderer for this Updater. See <a href="output/Ext.Updater.BasicRenderer.html#Ext.Updater.BasicRenderer-render" ext:member="render" ext:cls="Ext.Updater.BasicRenderer">Ext.Updater.BasicRenderer.render</a> for more details.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Updater</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-hasListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-hasListener">hasListener</a></b>(&nbsp;<code>String&nbsp;eventName</code>&nbsp;)
216     :
217                                         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.Updater-isAutoRefreshing"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-isAutoRefreshing">isAutoRefreshing</a></b>()
218     :
219                                         void<div class="mdesc"><div class="short">Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false.</div><div class="long">Returns true if the Updater is currently set to auto refresh its content (see <a href="output/Ext.Updater.html#Ext.Updater-startAutoRefresh" ext:member="startAutoRefresh" ext:cls="Ext.Updater">startAutoRefresh</a>), otherwise false.<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">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-isUpdating"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-isUpdating">isUpdating</a></b>()
220     :
221                                         Boolean<div class="mdesc"><div class="short">Returns true if an update is in progress, otherwise false.</div><div class="long">Returns true if an update is in progress, otherwise false.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Updater</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;)
222     :
223                                         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.
224 <b>If omitted, defaults to the object which fired the event.</b></div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration.</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#on" ext:member="#on" 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-purgeListeners"></a><b><a href="source/Observable.html#method-Ext.util.Observable-purgeListeners">purgeListeners</a></b>()
225     :
226                                         void<div class="mdesc"><div class="short">Removes all listeners for this object</div><div class="long">Removes all listeners for this object<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"><a href="output/Ext.util.Observable.html#purgeListeners" ext:member="#purgeListeners" 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.Updater-refresh"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-refresh">refresh</a></b>(&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;callback</code>]</span>&nbsp;)
227     :
228                                         void<div class="mdesc"><div class="short">Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately</div><div class="long">Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</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-relayEvents"></a><b><a href="source/Observable-more.html#method-Ext.util.Observable-relayEvents">relayEvents</a></b>(&nbsp;<code>Object&nbsp;o</code>,&nbsp;<code>Array&nbsp;events</code>&nbsp;)
229     :
230                                         void<div class="mdesc"><div class="short">Relays selected events from the specified Observable as if the events were fired by this.</div><div class="long">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.<div class="mdetail-params"><strong>Parameters:</strong><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><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#relayEvents" ext:member="#relayEvents" 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-removeListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-removeListener">removeListener</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;)
231     :
232                                         void<div class="mdesc"><div class="short">Removes an event handler.</div><div class="long">Removes an event handler.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event the handler was associated with.</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove. <b>This must be a reference to the function passed into the <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> call.</b></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope originally specified for the handler.</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#removeListener" ext:member="#removeListener" 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-resumeEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-resumeEvents">resumeEvents</a></b>()
233     :
234                                         void<div class="mdesc"><div class="short">Resume firing events. (see suspendEvents)
235 If events were suspended using the queueSuspended parameter, then all
236 event...</div><div class="long">Resume firing events. (see <a href="output/Ext.util.Observable.html#Ext.util.Observable-suspendEvents" ext:member="suspendEvents" ext:cls="Ext.util.Observable">suspendEvents</a>)
237 If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
238 events fired during event suspension will be sent to any listeners now.<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"><a href="output/Ext.util.Observable.html#resumeEvents" ext:member="#resumeEvents" 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.Updater-setDefaultUrl"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-setDefaultUrl">setDefaultUrl</a></b>(&nbsp;<code>String/Function&nbsp;defaultUrl</code>&nbsp;)
239     :
240                                         void<div class="mdesc"><div class="short">Sets the default URL used for updates.</div><div class="long">Sets the default URL used for updates.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>defaultUrl</code> : String/Function<div class="sub-desc">The url or a function to call to get the url</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-setRenderer"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-setRenderer">setRenderer</a></b>(&nbsp;<code>Object&nbsp;renderer</code>&nbsp;)
241     :
242                                         void<div class="mdesc"><div class="short">Sets the content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details.</div><div class="long">Sets the content renderer for this Updater. See <a href="output/Ext.Updater.BasicRenderer.html#Ext.Updater.BasicRenderer-render" ext:member="render" ext:cls="Ext.Updater.BasicRenderer">Ext.Updater.BasicRenderer.render</a> for more details.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>renderer</code> : Object<div class="sub-desc">The object implementing the render() method</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-showLoading"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-showLoading">showLoading</a></b>()
243     :
244                                         void<div class="mdesc"><div class="short">Display the element's "loading" state. By default, the element is updated with indicatorText. This
245 method may be over...</div><div class="long">Display the element's "loading" state. By default, the element is updated with <a href="output/Ext.Updater.html#Ext.Updater-indicatorText" ext:member="indicatorText" ext:cls="Ext.Updater">indicatorText</a>. This
246 method may be overridden to perform a custom action while this Updater is actively updating its contents.<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">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-startAutoRefresh"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-startAutoRefresh">startAutoRefresh</a></b>(&nbsp;<code>Number&nbsp;interval</code>,&nbsp;<span title="Optional" class="optional">[<code>String/Object/Function&nbsp;url</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>String/Object&nbsp;params</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Function&nbsp;callback</code>]</span>,&nbsp;<span title="Optional" class="optional">[<code>Boolean&nbsp;refreshNow</code>]</span>&nbsp;)
247     :
248                                         void<div class="mdesc"><div class="short">Set this element to auto refresh.  Can be canceled by calling stopAutoRefresh.</div><div class="long">Set this element to auto refresh.  Can be canceled by calling <a href="output/Ext.Updater.html#Ext.Updater-stopAutoRefresh" ext:member="stopAutoRefresh" ext:cls="Ext.Updater">stopAutoRefresh</a>.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>interval</code> : Number<div class="sub-desc">How often to update (in seconds).</div></li><li><code>url</code> : String/Object/Function<div class="sub-desc">(optional) The url for this request, a config object in the same format
249 supported by <a href="output/Ext.Updater.html#Ext.Updater-load" ext:member="load" ext:cls="Ext.Updater">load</a>, or a function to call to get the url (defaults to the last used url).  Note that while
250 the url used in a load call can be reused by this method, other load config options will not be reused and must be
251 sepcified as part of a config object passed as this paramter if needed.</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) The parameters to pass as either a url encoded string
252 "&param1=1&param2=2" or as an object {param1: 1, param2: 2}</div></li><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)</div></li><li><code>refreshNow</code> : Boolean<div class="sub-desc">(optional) Whether to execute the refresh now, or wait the interval</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-stopAutoRefresh"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-stopAutoRefresh">stopAutoRefresh</a></b>()
253     :
254                                         void<div class="mdesc"><div class="short">Stop auto refresh on this element.</div><div class="long">Stop auto refresh on this element.<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">Updater</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-suspendEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-suspendEvents">suspendEvents</a></b>(&nbsp;<code>Boolean&nbsp;queueSuspended</code>&nbsp;)
255     :
256                                         void<div class="mdesc"><div class="short">Suspend the firing of all events. (see resumeEvents)</div><div class="long">Suspend the firing of all events. (see <a href="output/Ext.util.Observable.html#Ext.util.Observable-resumeEvents" ext:member="resumeEvents" ext:cls="Ext.util.Observable">resumeEvents</a>)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>queueSuspended</code> : Boolean<div class="sub-desc">Pass as true to queue up suspended events to be fired
257 after the <a href="output/Ext.util.Observable.html#Ext.util.Observable-resumeEvents" ext:member="resumeEvents" ext:cls="Ext.util.Observable">resumeEvents</a> call instead of discarding all suspended events;</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#suspendEvents" ext:member="#suspendEvents" 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-un"></a><b><a href="source/Observable.html#method-Ext.util.Observable-un">un</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;)
258     :
259                                         void<div class="mdesc"><div class="short">Removes an event handler (shorthand for removeListener.)</div><div class="long">Removes an event handler (shorthand for <a href="output/Ext.util.Observable.html#Ext.util.Observable-removeListener" ext:member="removeListener" ext:cls="Ext.util.Observable">removeListener</a>.)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The type of event the handler was associated with.</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove. <b>This must be a reference to the function passed into the <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> call.</b></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope originally specified for the handler.</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#un" ext:member="#un" 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.Updater-update"></a><b><a href="source/UpdateManager.html#method-Ext.Updater-update">update</a></b>(&nbsp;<code>Object&nbsp;options</code>&nbsp;)
260     :
261                                         void<div class="mdesc"><div class="short">Performs an asynchronous request, updating this element with the response.
262 If params are specified it uses POST, othe...</div><div class="long">Performs an <b>asynchronous</b> request, updating this element with the response.
263 If params are specified it uses POST, otherwise it uses GET.<br><br>
264 <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element
265 will not have been fully updated when the function returns. To post-process the returned
266 data, use the callback option, or an <b><code>update</code></b> event handler.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>options</code> : Object<div class="sub-desc">A config object containing any of the following options:<ul>
267 <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which
268 <i>returns</i> the URL (defaults to the value of <a href="output/Ext.Ajax.html#Ext.Ajax-url" ext:member="url" ext:cls="Ext.Ajax">Ext.Ajax.url</a> if not specified).</p></li>
269 <li>method : <b>String</b><p class="sub-desc">The HTTP method to
270 use. Defaults to POST if the <code>params</code> argument is present, otherwise GET.</p></li>
271 <li>params : <b>String/Object/Function</b><p class="sub-desc">The
272 parameters to pass to the server (defaults to none). These may be specified as a url-encoded
273 string, or as an object containing properties which represent parameters,
274 or as a function, which returns such an object.</p></li>
275 <li>scripts : <b>Boolean</b><p class="sub-desc">If <code>true</code>
276 any &lt;script&gt; tags embedded in the response text will be extracted
277 and executed (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-loadScripts" ext:member="loadScripts" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.loadScripts</a>). If this option is specified,
278 the callback will be called <i>after</i> the execution of the scripts.</p></li>
279 <li>callback : <b>Function</b><p class="sub-desc">A function to
280 be called when the response from the server arrives. The following
281 parameters are passed:<ul>
282 <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
283 <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
284 <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
285 <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
286 </p></li>
287 <li>scope : <b>Object</b><p class="sub-desc">The scope in which
288 to execute the callback (The callback's <code>this</code> reference.) If the
289 <code>params</code> argument is a function, this scope is used for that function also.</p></li>
290 <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes
291 the default URL for this Updater object, and will be subsequently used in <a href="output/Ext.Updater.html#Ext.Updater-refresh" ext:member="refresh" ext:cls="Ext.Updater">refresh</a>
292 calls.  To bypass this behavior, pass <code>discardUrl:true</code> (defaults to false).</p></li>
293 <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before
294 timing out (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-timeout" ext:member="timeout" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.timeout</a>).</p></li>
295 <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the
296 <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-indicatorText" ext:member="indicatorText" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.indicatorText</a> div (defaults to 'Loading...').  To replace the entire div, not
297 just the text, override <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-indicatorText" ext:member="indicatorText" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.indicatorText</a> directly.</p></li>
298 <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
299 requests, this option causes an extra, auto-generated parameter to be appended to the request
300 to defeat caching (defaults to <a href="output/Ext.Updater.defaults.html#Ext.Updater.defaults-disableCaching" ext:member="disableCaching" ext:cls="Ext.Updater.defaults">Ext.Updater.defaults.disableCaching</a>).</p></li></ul>
301 <p>
302 For example:
303     <pre><code>um.update({
304         url: <em>"your-url.php"</em>,
305         params: {param1: <em>"foo"</em>, param2: <em>"bar"</em>}, <i>// or a URL encoded string</i>
306         callback: yourFunction,
307         scope: yourObject, <i>//(optional scope)</i>
308         discardUrl: true,
309         nocache: true,
310         text: <em>"Loading..."</em>,
311         timeout: 60,
312         scripts: false <i>// Save time by avoiding RegExp execution.</i>
313     });</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Updater</td></tr></tbody></table><a id="Ext.Updater-events"></a><h2>Public Events</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Event</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.Updater-beforeupdate"></a><b><a href="source/UpdateManager.html#event-Ext.Updater-beforeupdate">beforeupdate</a></b> :
314                                       (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>String/Object/Function&nbsp;url</code>,&nbsp;<code>String/Object&nbsp;params</code>&nbsp;)
315     <div class="mdesc"><div class="short">Fired before an update is made, return false from your handler and the update is cancelled.</div><div class="long">Fired before an update is made, return false from your handler and the update is cancelled.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>url</code> : String/Object/Function<div class="sub-desc"></div></li><li><code>params</code> : String/Object<div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-failure"></a><b><a href="source/UpdateManager.html#event-Ext.Updater-failure">failure</a></b> :
316                                       (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>Object&nbsp;oResponseObject</code>&nbsp;)
317     <div class="mdesc"><div class="short">Fired on update failure.</div><div class="long">Fired on update failure.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>oResponseObject</code> : Object<div class="sub-desc">The response Object</div></li></ul></div></div></div></td><td class="msource">Updater</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Updater-update"></a><b><a href="source/UpdateManager.html#event-Ext.Updater-update">update</a></b> :
318                                       (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>Object&nbsp;oResponseObject</code>&nbsp;)
319     <div class="mdesc"><div class="short">Fired after successful update is made.</div><div class="long">Fired after successful update is made.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>oResponseObject</code> : Object<div class="sub-desc">The response Object</div></li></ul></div></div></div></td><td class="msource">Updater</td></tr></tbody></table></div>