PageRenderTime 57ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/javascripts/lib/docs/output/Ext.Updater.html

https://bitbucket.org/ksokmesa/sina-asian
HTML | 319 lines | 312 code | 7 blank | 0 comment | 0 complexity | a3a8a046b5edfa5d2febaf23a11bed6a MD5 | raw file
Possible License(s): GPL-3.0
  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. <i>// Component passes itself into plugin&#39;s init method</i>
  44. init: <b>function</b>(c) {
  45. <b>var</b> p, l = this.listeners;
  46. <b>for</b> (p <b>in</b> l) {
  47. <b>if</b> (Ext.isFunction(l[p])) {
  48. l[p] = this.createHandler(l[p], c);
  49. } <b>else</b> {
  50. l[p].fn = this.createHandler(l[p].fn, c);
  51. }
  52. }
  53. <i>// Add the listeners to the Element immediately following the render call</i>
  54. c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() {
  55. <b>var</b> e = c.getEl();
  56. <b>if</b> (e) {
  57. e.on(l);
  58. }
  59. });
  60. },
  61. createHandler: <b>function</b>(fn, c) {
  62. <b>return</b> <b>function</b>(e) {
  63. fn.call(this, e, c);
  64. };
  65. }
  66. });
  67. <b>var</b> combo = <b>new</b> Ext.form.ComboBox({
  68. <i>// Collapse combo when its element is clicked on</i>
  69. plugins: [ <b>new</b> Ext.DomObserver({
  70. click: <b>function</b>(evt, comp) {
  71. comp.collapse();
  72. }
  73. })],
  74. store: myStore,
  75. typeAhead: true,
  76. mode: <em>'local'</em>,
  77. triggerAction: <em>'all'</em>
  78. });</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;)
  79. <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
  80. 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;)
  81. :
  82. 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', ...}).
  83. Usage:
  84. 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>.
  85. Usage:
  86. <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
  87. 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>()
  88. :
  89. 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;)
  90. :
  91. 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>
  92. 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.
  93. 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;)
  94. :
  95. 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.
  96. <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.
  97. properties. This may contain any of the following properties:<ul>
  98. <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
  99. <b>If omitted, defaults to the object which fired the event.</b></div></li>
  100. <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>
  101. <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>
  102. <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
  103. by the specified number of milliseconds. If the event fires again within that time, the original
  104. handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
  105. <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>
  106. if the event was bubbled up from a child Observable.</div></li>
  107. </ul><br>
  108. <p>
  109. <b>Combining Options</b><br>
  110. Using the options argument, it is possible to combine different types of listeners:<br>
  111. <br>
  112. A delayed, one-time listener.
  113. <pre><code>myDataView.on(<em>'click'</em>, this.onClick, this, {
  114. single: true,
  115. delay: 100
  116. });</code></pre>
  117. <p>
  118. <b>Attaching multiple handlers in 1 call</b><br>
  119. The method also allows for a single argument to be passed which is a config object containing properties
  120. which specify multiple handlers.
  121. <p>
  122. <pre><code>myGridPanel.on({
  123. <em>'click'</em> : {
  124. fn: this.onClick,
  125. scope: this,
  126. delay: 100
  127. },
  128. <em>'mouseover'</em> : {
  129. fn: this.onMouseOver,
  130. scope: this
  131. },
  132. <em>'mouseout'</em> : {
  133. fn: this.onMouseOut,
  134. scope: this
  135. }
  136. });</code></pre>
  137. <p>
  138. Or a shorthand syntax:<br>
  139. <pre><code>myGridPanel.on({
  140. <em>'click'</em> : this.onClick,
  141. <em>'mouseover'</em> : this.onMouseOver,
  142. <em>'mouseout'</em> : this.onMouseOut,
  143. scope: this
  144. });</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;)
  145. :
  146. void<div class="mdesc"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
  147. this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
  148. <code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
  149. <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
  150. implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
  151. access the required target more quickly.</p>
  152. <p>Example:</p><pre><code>Ext.override(Ext.form.Field, {
  153. <i>// Add functionality to Field&#39;s initComponent to enable the change event to bubble</i>
  154. initComponent : Ext.form.Field.prototype.initComponent.createSequence(<b>function</b>() {
  155. this.enableBubble(<em>'change'</em>);
  156. }),
  157. <i>// We know that we want Field&#39;s events to bubble directly to the FormPanel.</i>
  158. getBubbleTarget : <b>function</b>() {
  159. <b>if</b> (!this.formPanel) {
  160. this.formPanel = this.findParentByType(<em>'form'</em>);
  161. }
  162. <b>return</b> this.formPanel;
  163. }
  164. });
  165. <b>var</b> myForm = <b>new</b> Ext.formPanel({
  166. title: <em>'User Details'</em>,
  167. items: [{
  168. ...
  169. }],
  170. listeners: {
  171. change: <b>function</b>() {
  172. <i>// Title goes red <b>if</b> form has been modified.</i>
  173. myForm.header.setStyle(<em>'color'</em>, <em>'red'</em>);
  174. }
  175. }
  176. });</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;)
  177. :
  178. Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
  179. 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>
  180. <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>)
  181. 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;)
  182. :
  183. void<div class="mdesc"><div class="short">Performs an asynchronous form post, updating this element with the response. If the form has the attribute
  184. enctype="&lt;...</div><div class="long"><p>Performs an asynchronous form post, updating this element with the response. If the form has the attribute
  185. enctype="<a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form-data</a>", it assumes it's a file upload.
  186. Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.</p>
  187. <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b>
  188. performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
  189. DOM <code>&lt;form></code> element temporarily modified to have its
  190. <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer
  191. to a dynamically generated, hidden <code>&lt;iframe></code> which is inserted into the document
  192. but removed after the return data has been gathered.</p>
  193. <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>
  194. and some server technologies (notably JEE) may require some custom processing in order to
  195. 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
  196. parameters are passed:<ul>
  197. <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
  198. <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
  199. <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>()
  200. :
  201. void<div class="mdesc"><div class="short">This is an overrideable method which returns a reference to a default
  202. renderer class if none is specified when creati...</div><div class="long">This is an overrideable method which returns a reference to a default
  203. renderer class if none is specified when creating the Ext.Updater.
  204. 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>()
  205. :
  206. 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>()
  207. :
  208. 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;)
  209. :
  210. 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>()
  211. :
  212. 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>()
  213. :
  214. 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;)
  215. :
  216. 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.
  217. <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>()
  218. :
  219. 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;)
  220. :
  221. 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;)
  222. :
  223. 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;)
  224. :
  225. 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>()
  226. :
  227. void<div class="mdesc"><div class="short">Resume firing events. (see suspendEvents)
  228. If events were suspended using the queueSuspended parameter, then all
  229. 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>)
  230. If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
  231. 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;)
  232. :
  233. 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;)
  234. :
  235. 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>()
  236. :
  237. void<div class="mdesc"><div class="short">Display the element's "loading" state. By default, the element is updated with indicatorText. This
  238. 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
  239. 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;)
  240. :
  241. 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
  242. 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
  243. the url used in a load call can be reused by this method, other load config options will not be reused and must be
  244. 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
  245. "&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>()
  246. :
  247. 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;)
  248. :
  249. 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
  250. 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;)
  251. :
  252. 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;)
  253. :
  254. void<div class="mdesc"><div class="short">Performs an asynchronous request, updating this element with the response.
  255. If params are specified it uses POST, othe...</div><div class="long">Performs an <b>asynchronous</b> request, updating this element with the response.
  256. If params are specified it uses POST, otherwise it uses GET.<br><br>
  257. <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element
  258. will not have been fully updated when the function returns. To post-process the returned
  259. 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>
  260. <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which
  261. <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>
  262. <li>method : <b>String</b><p class="sub-desc">The HTTP method to
  263. use. Defaults to POST if the <code>params</code> argument is present, otherwise GET.</p></li>
  264. <li>params : <b>String/Object/Function</b><p class="sub-desc">The
  265. parameters to pass to the server (defaults to none). These may be specified as a url-encoded
  266. string, or as an object containing properties which represent parameters,
  267. or as a function, which returns such an object.</p></li>
  268. <li>scripts : <b>Boolean</b><p class="sub-desc">If <code>true</code>
  269. any &lt;script&gt; tags embedded in the response text will be extracted
  270. 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,
  271. the callback will be called <i>after</i> the execution of the scripts.</p></li>
  272. <li>callback : <b>Function</b><p class="sub-desc">A function to
  273. be called when the response from the server arrives. The following
  274. parameters are passed:<ul>
  275. <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
  276. <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
  277. <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
  278. <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
  279. </p></li>
  280. <li>scope : <b>Object</b><p class="sub-desc">The scope in which
  281. to execute the callback (The callback's <code>this</code> reference.) If the
  282. <code>params</code> argument is a function, this scope is used for that function also.</p></li>
  283. <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes
  284. 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>
  285. calls. To bypass this behavior, pass <code>discardUrl:true</code> (defaults to false).</p></li>
  286. <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before
  287. 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>
  288. <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the
  289. <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
  290. 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>
  291. <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
  292. requests, this option causes an extra, auto-generated parameter to be appended to the request
  293. 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>
  294. <p>
  295. For example:
  296. <pre><code>um.update({
  297. url: <em>"your-url.php"</em>,
  298. params: {param1: <em>"foo"</em>, param2: <em>"bar"</em>}, <i>// or a URL encoded string</i>
  299. callback: yourFunction,
  300. scope: yourObject, <i>//(optional scope)</i>
  301. discardUrl: true,
  302. nocache: true,
  303. text: <em>"Loading..."</em>,
  304. timeout: 60,
  305. scripts: false <i>// Save time by avoiding RegExp execution.</i>
  306. });</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> :
  307. (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>String/Object/Function&nbsp;url</code>,&nbsp;<code>String/Object&nbsp;params</code>&nbsp;)
  308. <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> :
  309. (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>Object&nbsp;oResponseObject</code>&nbsp;)
  310. <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> :
  311. (&nbsp;<code>Ext.Element&nbsp;el</code>,&nbsp;<code>Object&nbsp;oResponseObject</code>&nbsp;)
  312. <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>