Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.ComponentLoader.html
1 <!DOCTYPE html><html><head><title>Ext.ComponentLoader | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.ComponentLoader',
13         docClass: 'Ext.ComponentLoader',
14         docReq: 'Ext.ComponentLoader',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'ComponentLoader.html#Ext-ComponentLoader';
33     clsInfo = {"methods":["abort","addEvents","addListener","addManagedListener","capture","clearListeners","clearManagedListeners","destroy","enableBubble","fireEvent","getTarget","hasListener","isAutoRefreshing","load","observe","on","relayEvents","releaseCapture","removeListener","removeManagedListener","resumeEvents","setOptions","setTarget","startAutoRefresh","stopAutoRefresh","suspendEvents","un"],"cfgs":["ajaxOptions","autoLoad","baseParams","failure","listeners","loadMask","params","renderer","scope","scripts","success","target","url"],"properties":[],"events":["beforeload","exception"],"subclasses":[]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/ComponentLoader.html#Ext-ComponentLoader" target="_blank">Ext.ComponentLoader</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.ElementLoader.html" rel="Ext.ElementLoader" class="cls docClass">Ext.ElementLoader</a><div class="subclass"><strong>Ext.ComponentLoader</strong></div></div><h4>Mixins</h4><div class="mixin"><a href="Ext.util.Observable.html" rel="Ext.util.Observable" class="cls docClass">Ext.util.Observable</a></div></pre><p>This class is used to load content via Ajax into a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a>. In general
38 this class will not be instanced directly, rather a loader configuration will be passed to the
39 constructor of the <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a>.</p>
40
41 <h2>HTML Renderer</h2>
42
43 <p>By default, the content loaded will be processed as raw html. The response text
44 from the request is taken and added to the component. This can be used in
45 conjunction with the <a href="Ext.ComponentLoader.html#scripts" rel="Ext.ComponentLoader#scripts" class="docClass">scripts</a> option to execute any inline scripts in
46 the resulting content. Using this renderer has the same effect as passing the
47 <a href="Ext.Component.html#html" rel="Ext.Component#html" class="docClass">Ext.Component.html</a> configuration option.</p>
48
49 <h2>Data Renderer</h2>
50
51 <p>This renderer allows content to be added by using JSON data and a <a href="Ext.XTemplate.html" rel="Ext.XTemplate" class="docClass">Ext.XTemplate</a>.
52 The content received from the response is passed to the <a href="Ext.Component.html#update" rel="Ext.Component#update" class="docClass">Ext.Component.update</a> method.
53 This content is run through the attached <a href="Ext.Component.html#tpl" rel="Ext.Component#tpl" class="docClass">Ext.Component.tpl</a> and the data is added to
54 the Component. Using this renderer has the same effect as using the <a href="Ext.Component.html#data" rel="Ext.Component#data" class="docClass">Ext.Component.data</a>
55 configuration in conjunction with a <a href="Ext.Component.html#tpl" rel="Ext.Component#tpl" class="docClass">Ext.Component.tpl</a>.</p>
56
57 <h2>Component Renderer</h2>
58
59 <p>This renderer can only be used with a <a href="Ext.Container.html" rel="Ext.Container" class="docClass">Ext.Container</a> and subclasses. It allows for
60 Components to be loaded remotely into a Container. The response is expected to be a single/series of
61 <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> configuration objects. When the response is received, the data is decoded
62 and then passed to <a href="Ext.Container.html#add" rel="Ext.Container#add" class="docClass">Ext.Container.add</a>. Using this renderer has the same effect as specifying
63 the <a href="Ext.Container.html#items" rel="Ext.Container#items" class="docClass">Ext.Container.items</a> configuration on a Container.</p>
64
65 <h2>Custom Renderer</h2>
66
67 <p>A custom function can be passed to handle any other special case, see the <a href="Ext.ComponentLoader.html#renderer" rel="Ext.ComponentLoader#renderer" class="docClass">renderer</a> option.</p>
68
69 <h2>Example Usage</h2>
70
71 <pre class="prettyprint"><code>new Ext.Component({
72     tpl: '{firstName} - {lastName}',
73     loader: {
74         url: 'myPage.php',
75         renderer: 'data',
76         params: {
77             userId: 1
78         }
79     }
80 });
81 </code></pre>
82 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-ajaxOptions" class="member f inherited"><a href="Ext.ComponentLoader.html#config-ajaxOptions" rel="config-ajaxOptions" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-ajaxOptions" class="viewSource">view source</a></div><a name="ajaxOptions"></a><a name="config-ajaxOptions"></a><a href="Ext.ComponentLoader.html#" rel="config-ajaxOptions" class="cls expand">ajaxOptions</a><span> : Object</span></div><div class="description"><div class="short"><p>Any additional options to be passed to the request, for example timeout or headers. Defaults to <tt>null</tt>.</p>
83 </div><div class="long"><p>Any additional options to be passed to the request, for example timeout or headers. Defaults to <tt>null</tt>.</p>
84 </div></div></div><div id="config-autoLoad" class="member inherited"><a href="Ext.ComponentLoader.html#config-autoLoad" rel="config-autoLoad" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-autoLoad" class="viewSource">view source</a></div><a name="autoLoad"></a><a name="config-autoLoad"></a><a href="Ext.ComponentLoader.html#" rel="config-autoLoad" class="cls expand">autoLoad</a><span> : Boolean/Object</span></div><div class="description"><div class="short">True to have the loader make a request as soon as it is created. Defaults to false.
85 This argument can also be a set o...</div><div class="long"><p>True to have the loader make a request as soon as it is created. Defaults to <tt>false</tt>.
86 This argument can also be a set of options that will be passed to <a href="Ext.ComponentLoader.html#load" rel="Ext.ComponentLoader#load" class="docClass">load</a> is called.</p>
87 </div></div></div><div id="config-baseParams" class="member inherited"><a href="Ext.ComponentLoader.html#config-baseParams" rel="config-baseParams" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-baseParams" class="viewSource">view source</a></div><a name="baseParams"></a><a name="config-baseParams"></a><a href="Ext.ComponentLoader.html#" rel="config-baseParams" class="cls expand">baseParams</a><span> : Object</span></div><div class="description"><div class="short">Params that will be attached to every request. These parameters
88 will not be overridden by any params in the load opti...</div><div class="long"><p>Params that will be attached to every request. These parameters
89 will not be overridden by any params in the load options. Defaults to <tt>null</tt>.</p>
90 </div></div></div><div id="config-failure" class="member inherited"><a href="Ext.ComponentLoader.html#config-failure" rel="config-failure" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-failure" class="viewSource">view source</a></div><a name="failure"></a><a name="config-failure"></a><a href="Ext.ComponentLoader.html#" rel="config-failure" class="cls expand">failure</a><span> : Function</span></div><div class="description"><div class="short"><p>A function to be called when a load request fails.</p>
91 </div><div class="long"><p>A function to be called when a load request fails.</p>
92 </div></div></div><div id="config-listeners" class="member inherited"><a href="Ext.ComponentLoader.html#config-listeners" rel="config-listeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-cfg-listeners" class="viewSource">view source</a></div><a name="listeners"></a><a name="config-listeners"></a><a href="Ext.ComponentLoader.html#" rel="config-listeners" class="cls expand">listeners</a><span> : Object</span></div><div class="description"><div class="short">(optional) A config object containing one or more event handlers to be added to this
93 object during initialization.  T...</div><div class="long"><p>(optional) <p>A config object containing one or more event handlers to be added to this
94 object during initialization.  This should be a valid listeners config object as specified in the
95 <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a> example for attaching multiple handlers at once.</p></p>
96
97 <br><p><b><u>DOM events from ExtJs <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a></u></b></p>
98
99
100 <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
101
102
103 <p>is usually only done when extra value can be added. For example the <a href="Ext.view.View.html" rel="Ext.view.View" class="docClass">DataView</a>'s
104 <b><code><a href="Ext.view.View.html#click" rel="Ext.view.View#click" class="docClass">click</a></code></b> event passing the node clicked on. To access DOM
105 events directly from a child element of a Component, we need to specify the <code>element</code> option to
106 identify the Component property to add a DOM listener to:</p>
107
108 <pre><code>new Ext.panel.Panel({
109     width: 400,
110     height: 200,
111     dockedItems: [{
112         xtype: 'toolbar'
113     }],
114     listeners: {
115         click: {
116             element: 'el', //bind to the underlying el property on the panel
117             fn: function(){ console.log('click el'); }
118         },
119         dblclick: {
120             element: 'body', //bind to the underlying body property on the panel
121             fn: function(){ console.log('dblclick body'); }
122         }
123     }
124 });
125 </code></pre>
126
127
128 <p></p></p>
129 </div></div></div><div id="config-loadMask" class="member ni"><a href="Ext.ComponentLoader.html#config-loadMask" rel="config-loadMask" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-cfg-loadMask" class="viewSource">view source</a></div><a name="loadMask"></a><a name="config-loadMask"></a><a href="Ext.ComponentLoader.html#" rel="config-loadMask" class="cls expand">loadMask</a><span> : Mixed</span></div><div class="description"><div class="short"><p>True or a <a href="Ext.LoadMask.html" rel="Ext.LoadMask" class="docClass">Ext.LoadMask</a> configuration to enable masking during loading. Defaults to <tt>false</tt>.</p>
130 </div><div class="long"><p>True or a <a href="Ext.LoadMask.html" rel="Ext.LoadMask" class="docClass">Ext.LoadMask</a> configuration to enable masking during loading. Defaults to <tt>false</tt>.</p>
131 </div></div></div><div id="config-params" class="member inherited"><a href="Ext.ComponentLoader.html#config-params" rel="config-params" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-params" class="viewSource">view source</a></div><a name="params"></a><a name="config-params"></a><a href="Ext.ComponentLoader.html#" rel="config-params" class="cls expand">params</a><span> : Object</span></div><div class="description"><div class="short">Any params to be attached to the Ajax request. These parameters will
132 be overridden by any params in the load options....</div><div class="long"><p>Any params to be attached to the Ajax request. These parameters will
133 be overridden by any params in the load options. Defaults to <tt>null</tt>.</p>
134 </div></div></div><div id="config-renderer" class="member ni"><a href="Ext.ComponentLoader.html#config-renderer" rel="config-renderer" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-cfg-renderer" class="viewSource">view source</a></div><a name="renderer"></a><a name="config-renderer"></a><a href="Ext.ComponentLoader.html#" rel="config-renderer" class="cls expand">renderer</a><span> : String/Function</span></div><div class="description"><div class="short">The type of content that is to be loaded into, which can be one of 3 types:
135
136
137 html : Loads raw html content, see Ext....</div><div class="long"><p>The type of content that is to be loaded into, which can be one of 3 types:</p>
138
139 <ul>
140 <li><strong>html</strong> : Loads raw html content, see <a href="Ext.Component.html#html" rel="Ext.Component#html" class="docClass">Ext.Component.html</a></li>
141 <li><strong>data</strong> : Loads raw html content, see <a href="Ext.Component.html#data" rel="Ext.Component#data" class="docClass">Ext.Component.data</a></li>
142 <li><strong>component</strong> : Loads child {Ext.Component} instances. This option is only valid when used with a Container.</li>
143 </ul>
144
145
146 <p>Defaults to <code>html</code>.</p>
147
148 <p>Alternatively, you can pass a function which is called with the following parameters.</p>
149
150 <ul>
151 <li>loader - Loader instance</li>
152 <li>response - The server response</li>
153 <li>active - The active request</li>
154 </ul>
155
156
157 <p>The function must return false is loading is not successful. Below is a sample of using a custom renderer:</p>
158
159 <pre><code>new Ext.Component({
160     loader: {
161         url: 'myPage.php',
162         renderer: function(loader, response, active) {
163             var text = response.responseText;
164             loader.getTarget().update('The response is ' + text);
165             return true;
166         }
167     }
168 });
169 </code></pre>
170 </div></div></div><div id="config-scope" class="member inherited"><a href="Ext.ComponentLoader.html#config-scope" rel="config-scope" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-scope" class="viewSource">view source</a></div><a name="scope"></a><a name="config-scope"></a><a href="Ext.ComponentLoader.html#" rel="config-scope" class="cls expand">scope</a><span> : Object</span></div><div class="description"><div class="short"><p>The scope to execute the <a href="Ext.ComponentLoader.html#success" rel="Ext.ComponentLoader#success" class="docClass">success</a> and <a href="Ext.ComponentLoader.html#failure" rel="Ext.ComponentLoader#failure" class="docClass">failure</a> functions in.</p>
171 </div><div class="long"><p>The scope to execute the <a href="Ext.ComponentLoader.html#success" rel="Ext.ComponentLoader#success" class="docClass">success</a> and <a href="Ext.ComponentLoader.html#failure" rel="Ext.ComponentLoader#failure" class="docClass">failure</a> functions in.</p>
172 </div></div></div><div id="config-scripts" class="member ni"><a href="Ext.ComponentLoader.html#config-scripts" rel="config-scripts" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-cfg-scripts" class="viewSource">view source</a></div><a name="scripts"></a><a name="config-scripts"></a><a href="Ext.ComponentLoader.html#" rel="config-scripts" class="cls expand">scripts</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to parse any inline script tags in the response. This only used when using the html
173 <a href="Ext.ComponentLoader.html#renderer" rel="Ext.ComponentLoader#renderer" class="docClass">renderer</a>.</p>
174 </div><div class="long"><p>True to parse any inline script tags in the response. This only used when using the html
175 <a href="Ext.ComponentLoader.html#renderer" rel="Ext.ComponentLoader#renderer" class="docClass">renderer</a>.</p>
176 </div></div></div><div id="config-success" class="member inherited"><a href="Ext.ComponentLoader.html#config-success" rel="config-success" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-success" class="viewSource">view source</a></div><a name="success"></a><a name="config-success"></a><a href="Ext.ComponentLoader.html#" rel="config-success" class="cls expand">success</a><span> : Function</span></div><div class="description"><div class="short"><p>A function to be called when a load request is successful.</p>
177 </div><div class="long"><p>A function to be called when a load request is successful.</p>
178 </div></div></div><div id="config-target" class="member ni"><a href="Ext.ComponentLoader.html#config-target" rel="config-target" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-cfg-target" class="viewSource">view source</a></div><a name="target"></a><a name="config-target"></a><a href="Ext.ComponentLoader.html#" rel="config-target" class="cls expand">target</a><span> : Ext.Component/String</span></div><div class="description"><div class="short"><p>The target <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> for the loader. Defaults to <tt>null</tt>.
179 If a string is passed it will be looked up via the id.</p>
180 </div><div class="long"><p>The target <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> for the loader. Defaults to <tt>null</tt>.
181 If a string is passed it will be looked up via the id.</p>
182 </div></div></div><div id="config-url" class="member inherited"><a href="Ext.ComponentLoader.html#config-url" rel="config-url" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-cfg-url" class="viewSource">view source</a></div><a name="url"></a><a name="config-url"></a><a href="Ext.ComponentLoader.html#" rel="config-url" class="cls expand">url</a><span> : String</span></div><div class="description"><div class="short"><p>The url to retrieve the content from. Defaults to <tt>null</tt>.</p>
183 </div><div class="long"><p>The url to retrieve the content from. Defaults to <tt>null</tt>.</p>
184 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-abort" class="member f inherited"><a href="Ext.ComponentLoader.html#method-abort" rel="method-abort" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-abort" class="viewSource">view source</a></div><a name="abort"></a><a name="method-abort"></a><a href="Ext.ComponentLoader.html#" rel="method-abort" class="cls expand">abort</a> : void</div><div class="description"><div class="short"><p>Aborts the active load request</p>
185 </div><div class="long"><p>Aborts the active load request</p>
186 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
187 </li></ul></div></div></div><div id="method-addEvents" class="member inherited"><a href="Ext.ComponentLoader.html#method-addEvents" rel="method-addEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addEvents" class="viewSource">view source</a></div><a name="addEvents"></a><a name="method-addEvents"></a><a href="Ext.ComponentLoader.html#" rel="method-addEvents" class="cls expand">addEvents</a>(
188 <span class="pre">Object/String o, String </span>)
189  : void</div><div class="description"><div class="short"><p>Adds the specified events to the list of events which this Observable may fire.</p>
190 </div><div class="long"><p>Adds the specified events to the list of events which this Observable may fire.</p>
191 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Object/String<div class="sub-desc"><p>Either an object with event names as properties with a value of <code>true</code>
192 or the first event name string if multiple event names are being passed as separate parameters.</p>
193 </div></li><li><span class="pre"></span> : String<div class="sub-desc"><p>[additional] Optional additional event names if multiple event names are being passed as separate parameters.
194 Usage:</p>
195
196 <pre><code>this.addEvents('storeloaded', 'storecleared');
197 </code></pre>
198
199 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
200 </li></ul></div></div></div><div id="method-addListener" class="member inherited"><a href="Ext.ComponentLoader.html#method-addListener" rel="method-addListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addListener" class="viewSource">view source</a></div><a name="addListener"></a><a name="method-addListener"></a><a href="Ext.ComponentLoader.html#" rel="method-addListener" class="cls expand">addListener</a>(
201 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
202  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object.</p>
203 </div><div class="long"><p>Appends an event handler to this object.</p>
204 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to listen for. May also be an object who's property names are event names. See</p>
205 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes.</p>
206 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
207 <b>If omitted, defaults to the object which fired the event.</b></p>
208 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.
209 properties. This may contain any of the following properties:<ul>
210 <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
211 <b>If omitted, defaults to the object which fired the event.</b></div></li>
212 <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>
213 <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>
214 <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="Ext.util.DelayedTask.html" rel="Ext.util.DelayedTask" class="docClass">Ext.util.DelayedTask</a> delayed
215 by the specified number of milliseconds. If the event fires again within that time, the original
216 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
217 <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>
218 if the event was bubbled up from a child Observable.</div></li>
219 <li><b>element</b> : String<div class="sub-desc"><b>This option is only valid for listeners bound to <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a>.</b>
220 The name of a Component property which references an element to add a listener to.</p>
221
222 <p>This option is useful during Component construction to add DOM event listeners to elements of <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a> which
223 will exist only after the Component is rendered. For example, to add a click listener to a Panel's body:
224 <pre><code>new Ext.panel.Panel({
225     title: 'The title',
226     listeners: {
227         click: this.handlePanelClick,
228         element: 'body'
229     }
230 });
231 </code></pre></p>
232
233
234 <p>When added in this way, the options available are the options applicable to <a href="Ext.core.Element.html#addListener" rel="Ext.core.Element#addListener" class="docClass">Ext.core.Element.addListener</a></p>
235
236
237 <p></div></li>
238 </ul><br></p>
239
240 <p>
241 <b>Combining Options</b><br>
242 Using the options argument, it is possible to combine different types of listeners:<br>
243 <br>
244 A delayed, one-time listener.
245 <pre><code>myPanel.on('hide', this.handleClick, this, {
246 single: true,
247 delay: 100
248 });</code></pre>
249 <p>
250 <b>Attaching multiple handlers in 1 call</b><br>
251 The method also allows for a single argument to be passed which is a config object containing properties
252 which specify multiple events. For example:
253 <pre><code>myGridPanel.on({
254     cellClick: this.onCellClick,
255     mouseover: this.onMouseOver,
256     mouseout: this.onMouseOut,
257     scope: this // Important. Ensure "this" is correct during handler execution
258 });
259 </code></pre>.
260 <p>
261
262 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
263 </li></ul></div></div></div><div id="method-addManagedListener" class="member inherited"><a href="Ext.ComponentLoader.html#method-addManagedListener" rel="method-addManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addManagedListener" class="viewSource">view source</a></div><a name="addManagedListener"></a><a name="method-addManagedListener"></a><a href="Ext.ComponentLoader.html#" rel="method-addManagedListener" class="cls expand">addManagedListener</a>(
264 <span class="pre">Observable/Element item, Object/String ename, Function fn, Object scope, Object opt</span>)
265  : void</div><div class="description"><div class="short"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
266 is destroyed.
267
268 </div><div class="long"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
269 is destroyed.
270
271 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable/Element<div class="sub-desc"><p>The item to which to add a listener/listeners.</p>
272 </div></li><li><span class="pre">ename</span> : Object/String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
273 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
274 is the handler function.</p>
275 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
276 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
277 </div></li><li><span class="pre">opt</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
278 is the <a href="Ext.util.Observable.html#addListener" rel="Ext.util.Observable#addListener" class="docClass">addListener</a> options.</p>
279 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
280 </li></ul></div></div></div><div id="method-capture" class="member inherited"><a href="Ext.ComponentLoader.html#method-capture" rel="method-capture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-capture" class="viewSource">view source</a></div><a name="capture"></a><a name="method-capture"></a><a href="Ext.ComponentLoader.html#" rel="method-capture" class="cls expand">capture</a>(
281 <span class="pre">Observable o, Function fn, [Object scope]</span>)
282  : void</div><div class="description"><div class="short">Starts capture on the specified Observable. All events will be passed
283 to the supplied function with the event name + ...</div><div class="long"><p>Starts capture on the specified Observable. All events will be passed
284 to the supplied function with the event name + standard signature of the event
285 <b>before</b> the event is fired. If the supplied function returns false,
286 the event will not fire.</p>
287 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to capture events from.</p>
288 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to call when an event is fired.</p>
289 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Observable firing the event.</p>
290 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
291 </li></ul></div></div></div><div id="method-clearListeners" class="member inherited"><a href="Ext.ComponentLoader.html#method-clearListeners" rel="method-clearListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearListeners" class="viewSource">view source</a></div><a name="clearListeners"></a><a name="method-clearListeners"></a><a href="Ext.ComponentLoader.html#" rel="method-clearListeners" class="cls expand">clearListeners</a> : void</div><div class="description"><div class="short"><p>Removes all listeners for this object including the managed listeners</p>
292 </div><div class="long"><p>Removes all listeners for this object including the managed listeners</p>
293 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
294 </li></ul></div></div></div><div id="method-clearManagedListeners" class="member inherited"><a href="Ext.ComponentLoader.html#method-clearManagedListeners" rel="method-clearManagedListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearManagedListeners" class="viewSource">view source</a></div><a name="clearManagedListeners"></a><a name="method-clearManagedListeners"></a><a href="Ext.ComponentLoader.html#" rel="method-clearManagedListeners" class="cls expand">clearManagedListeners</a> : void</div><div class="description"><div class="short"><p>Removes all managed listeners for this object.</p>
295 </div><div class="long"><p>Removes all managed listeners for this object.</p>
296 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
297 </li></ul></div></div></div><div id="method-destroy" class="member inherited"><a href="Ext.ComponentLoader.html#method-destroy" rel="method-destroy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-destroy" class="viewSource">view source</a></div><a name="destroy"></a><a name="method-destroy"></a><a href="Ext.ComponentLoader.html#" rel="method-destroy" class="cls expand">destroy</a> : void</div><div class="description"><div class="short"><p>Destroys the loader. Any active requests will be aborted.</p>
298 </div><div class="long"><p>Destroys the loader. Any active requests will be aborted.</p>
299 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
300 </li></ul></div></div></div><div id="method-enableBubble" class="member inherited"><a href="Ext.ComponentLoader.html#method-enableBubble" rel="method-enableBubble" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-enableBubble" class="viewSource">view source</a></div><a name="enableBubble"></a><a name="method-enableBubble"></a><a href="Ext.ComponentLoader.html#" rel="method-enableBubble" class="cls expand">enableBubble</a>(
301 <span class="pre">String/Array events</span>)
302  : void</div><div class="description"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
303 this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
304 <code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
305
306
307 <p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>. The default
308 implementation in <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> returns the Component's immediate owner. But if a known target is required, this can be overridden to
309 access the required target more quickly.</p>
310
311
312 <p>Example:</p>
313
314
315 <pre><code>Ext.override(Ext.form.field.Base, {
316 //  Add functionality to Field&#39;s initComponent to enable the change event to bubble
317 initComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {
318     this.enableBubble('change');
319 }),
320
321 //  We know that we want Field&#39;s events to bubble directly to the FormPanel.
322 getBubbleTarget : function() {
323     if (!this.formPanel) {
324         this.formPanel = this.findParentByType('form');
325     }
326     return this.formPanel;
327 }
328 });
329
330 var myForm = new Ext.formPanel({
331 title: 'User Details',
332 items: [{
333     ...
334 }],
335 listeners: {
336     change: function() {
337         // Title goes red if form has been modified.
338         myForm.header.setStyle('color', 'red');
339     }
340 }
341 });
342 </code></pre>
343
344 <h3 class="pa">Parameters</h3><ul><li><span class="pre">events</span> : String/Array<div class="sub-desc"><p>The event name to bubble, or an Array of event names.</p>
345 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
346 </li></ul></div></div></div><div id="method-fireEvent" class="member inherited"><a href="Ext.ComponentLoader.html#method-fireEvent" rel="method-fireEvent" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-fireEvent" class="viewSource">view source</a></div><a name="fireEvent"></a><a name="method-fireEvent"></a><a href="Ext.ComponentLoader.html#" rel="method-fireEvent" class="cls expand">fireEvent</a>(
347 <span class="pre">String eventName, Object... args</span>)
348  : Boolean</div><div class="description"><div class="short">Fires the specified event with the passed parameters (minus the event name).
349
350
351 An event may be set to bubble up an Ob...</div><div class="long"><p>Fires the specified event with the passed parameters (minus the event name).</p>
352
353
354 <p>An event may be set to bubble up an Observable parent hierarchy (See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>)
355 by calling <a href="Ext.ComponentLoader.html#enableBubble" rel="Ext.ComponentLoader#enableBubble" class="docClass">enableBubble</a>.</p>
356
357 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to fire.</p>
358 </div></li><li><span class="pre">args</span> : Object...<div class="sub-desc"><p>Variable number of parameters are passed to handlers.</p>
359 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>returns false if any of the handlers return false otherwise it returns true.</p>
360 </li></ul></div></div></div><div id="method-getTarget" class="member inherited"><a href="Ext.ComponentLoader.html#method-getTarget" rel="method-getTarget" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-getTarget" class="viewSource">view source</a></div><a name="getTarget"></a><a name="method-getTarget"></a><a href="Ext.ComponentLoader.html#" rel="method-getTarget" class="cls expand">getTarget</a> : Ext.Component</div><div class="description"><div class="short"><p>Get the target of this loader.</p>
361 </div><div class="long"><p>Get the target of this loader.</p>
362 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>target The target, null if none exists.</p>
363 </li></ul></div></div></div><div id="method-hasListener" class="member inherited"><a href="Ext.ComponentLoader.html#method-hasListener" rel="method-hasListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-hasListener" class="viewSource">view source</a></div><a name="hasListener"></a><a name="method-hasListener"></a><a href="Ext.ComponentLoader.html#" rel="method-hasListener" class="cls expand">hasListener</a>(
364 <span class="pre">String eventName</span>)
365  : Boolean</div><div class="description"><div class="short"><p>Checks to see if this object has any listeners for a specified event</p>
366 </div><div class="long"><p>Checks to see if this object has any listeners for a specified event</p>
367 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to check for</p>
368 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the event is being listened for, else false</p>
369 </li></ul></div></div></div><div id="method-isAutoRefreshing" class="member inherited"><a href="Ext.ComponentLoader.html#method-isAutoRefreshing" rel="method-isAutoRefreshing" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-isAutoRefreshing" class="viewSource">view source</a></div><a name="isAutoRefreshing"></a><a name="method-isAutoRefreshing"></a><a href="Ext.ComponentLoader.html#" rel="method-isAutoRefreshing" class="cls expand">isAutoRefreshing</a> : Boolean</div><div class="description"><div class="short"><p>Checks whether the loader is automatically refreshing. See <a href="Ext.ComponentLoader.html#startAutoRefresh" rel="Ext.ComponentLoader#startAutoRefresh" class="docClass">startAutoRefresh</a>.</p>
370 </div><div class="long"><p>Checks whether the loader is automatically refreshing. See <a href="Ext.ComponentLoader.html#startAutoRefresh" rel="Ext.ComponentLoader#startAutoRefresh" class="docClass">startAutoRefresh</a>.</p>
371 <h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the loader is automatically refreshing</p>
372 </li></ul></div></div></div><div id="method-load" class="member inherited"><a href="Ext.ComponentLoader.html#method-load" rel="method-load" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-load" class="viewSource">view source</a></div><a name="load"></a><a name="method-load"></a><a href="Ext.ComponentLoader.html#" rel="method-load" class="cls expand">load</a>(
373 <span class="pre">Object options</span>)
374  : void</div><div class="description"><div class="short"><p>Load new data from the server.</p>
375 </div><div class="long"><p>Load new data from the server.</p>
376 <h3 class="pa">Parameters</h3><ul><li><span class="pre">options</span> : Object<div class="sub-desc"><p>The options for the request. They can be any configuration option that can be specified for
377 the class, with the exception of the target option. Note that any options passed to the method will override any
378 class defaults.</p>
379 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
380 </li></ul></div></div></div><div id="method-observe" class="member inherited"><a href="Ext.ComponentLoader.html#method-observe" rel="method-observe" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-observe" class="viewSource">view source</a></div><a name="observe"></a><a name="method-observe"></a><a href="Ext.ComponentLoader.html#" rel="method-observe" class="cls expand">observe</a>(
381 <span class="pre">Function c, Object listeners</span>)
382  : void</div><div class="description"><div class="short">Sets observability on the passed class constructor.
383
384 This makes any event fired on any instance of the passed class a...</div><div class="long"><p>Sets observability on the passed class constructor.</p>
385
386 <p>This makes any event fired on any instance of the passed class also fire a single event through
387 the <strong>class</strong> allowing for central handling of events on many instances at once.</p>
388
389 <p>Usage:</p>
390
391 <pre><code>Ext.util.Observable.observe(Ext.data.Connection);
392 Ext.data.Connection.on('beforerequest', function(con, options) {
393     console.log('Ajax request made to ' + options.url);
394 });
395 </code></pre>
396 <h3 class="pa">Parameters</h3><ul><li><span class="pre">c</span> : Function<div class="sub-desc"><p>The class constructor to make observable.</p>
397 </div></li><li><span class="pre">listeners</span> : Object<div class="sub-desc"><p>An object containing a series of listeners to add. See <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a>.</p>
398 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
399 </li></ul></div></div></div><div id="method-on" class="member inherited"><a href="Ext.ComponentLoader.html#method-on" rel="method-on" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-on" class="viewSource">view source</a></div><a name="on"></a><a name="method-on"></a><a href="Ext.ComponentLoader.html#" rel="method-on" class="cls expand">on</a>(
400 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
401  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object (shorthand for <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a>.)</p>
402 </div><div class="long"><p>Appends an event handler to this object (shorthand for <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a>.)</p>
403 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event to listen for</p>
404 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes</p>
405 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
406 <b>If omitted, defaults to the object which fired the event.</b></p>
407 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.</p>
408 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
409 </li></ul></div></div></div><div id="method-relayEvents" class="member inherited"><a href="Ext.ComponentLoader.html#method-relayEvents" rel="method-relayEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-relayEvents" class="viewSource">view source</a></div><a name="relayEvents"></a><a name="method-relayEvents"></a><a href="Ext.ComponentLoader.html#" rel="method-relayEvents" class="cls expand">relayEvents</a>(
410 <span class="pre">Object origin, Array events, Object prefix</span>)
411  : void</div><div class="description"><div class="short"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
412 </div><div class="long"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
413 <h3 class="pa">Parameters</h3><ul><li><span class="pre">origin</span> : Object<div class="sub-desc"><p>The Observable whose events this object is to relay.</p>
414 </div></li><li><span class="pre">events</span> : Array<div class="sub-desc"><p>Array of event names to relay.</p>
415 </div></li><li><span class="pre">prefix</span> : Object<div class="sub-desc">
416 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
417 </li></ul></div></div></div><div id="method-releaseCapture" class="member inherited"><a href="Ext.ComponentLoader.html#method-releaseCapture" rel="method-releaseCapture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-releaseCapture" class="viewSource">view source</a></div><a name="releaseCapture"></a><a name="method-releaseCapture"></a><a href="Ext.ComponentLoader.html#" rel="method-releaseCapture" class="cls expand">releaseCapture</a>(
418 <span class="pre">Observable o</span>)
419  : void</div><div class="description"><div class="short"><p>Removes <b>all</b> added captures from the Observable.</p>
420 </div><div class="long"><p>Removes <b>all</b> added captures from the Observable.</p>
421 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to release</p>
422 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
423 </li></ul></div></div></div><div id="method-removeListener" class="member inherited"><a href="Ext.ComponentLoader.html#method-removeListener" rel="method-removeListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeListener" class="viewSource">view source</a></div><a name="removeListener"></a><a name="method-removeListener"></a><a href="Ext.ComponentLoader.html#" rel="method-removeListener" class="cls expand">removeListener</a>(
424 <span class="pre">String eventName, Function handler, [Object scope]</span>)
425  : void</div><div class="description"><div class="short"><p>Removes an event handler.</p>
426 </div><div class="long"><p>Removes an event handler.</p>
427 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
428 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a> call.</b></p>
429 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
430 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
431 </li></ul></div></div></div><div id="method-removeManagedListener" class="member inherited"><a href="Ext.ComponentLoader.html#method-removeManagedListener" rel="method-removeManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeManagedListener" class="viewSource">view source</a></div><a name="removeManagedListener"></a><a name="method-removeManagedListener"></a><a href="Ext.ComponentLoader.html#" rel="method-removeManagedListener" class="cls expand">removeManagedListener</a>(
432 <span class="pre">Observable|Element item, Object|String ename, Function fn, Object scope</span>)
433  : void</div><div class="description"><div class="short"><p>Removes listeners that were added by the <a href="Ext.ComponentLoader.html#mon" rel="Ext.ComponentLoader#mon" class="docClass">mon</a> method.</p>
434 </div><div class="long"><p>Removes listeners that were added by the <a href="Ext.ComponentLoader.html#mon" rel="Ext.ComponentLoader#mon" class="docClass">mon</a> method.</p>
435 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable|Element<div class="sub-desc"><p>The item from which to remove a listener/listeners.</p>
436 </div></li><li><span class="pre">ename</span> : Object|String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
437 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
438 is the handler function.</p>
439 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
440 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
441 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
442 </li></ul></div></div></div><div id="method-resumeEvents" class="member inherited"><a href="Ext.ComponentLoader.html#method-resumeEvents" rel="method-resumeEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-resumeEvents" class="viewSource">view source</a></div><a name="resumeEvents"></a><a name="method-resumeEvents"></a><a href="Ext.ComponentLoader.html#" rel="method-resumeEvents" class="cls expand">resumeEvents</a> : void</div><div class="description"><div class="short">Resume firing events. (see suspendEvents)
443 If events were suspended using the queueSuspended parameter, then all
444 event...</div><div class="long"><p>Resume firing events. (see <a href="Ext.ComponentLoader.html#suspendEvents" rel="Ext.ComponentLoader#suspendEvents" class="docClass">suspendEvents</a>)
445 If events were suspended using the <code><b>queueSuspended</b></code> parameter, then all
446 events fired during event suspension will be sent to any listeners now.</p>
447 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
448 </li></ul></div></div></div><div id="method-setOptions" class="member ni"><a href="Ext.ComponentLoader.html#method-setOptions" rel="method-setOptions" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-method-setOptions" class="viewSource">view source</a></div><a name="setOptions"></a><a name="method-setOptions"></a><a href="Ext.ComponentLoader.html#" rel="method-setOptions" class="cls expand">setOptions</a>(
449 <span class="pre">Object active, Object options</span>)
450  : Ext.Component</div><div class="description"><div class="short"><p>Get the target of this loader.</p>
451 </div><div class="long"><p>Get the target of this loader.</p>
452 <h3 class="pa">Parameters</h3><ul><li><span class="pre">active</span> : Object<div class="sub-desc">
453 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc">
454 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>target The target, null if none exists.</p>
455 </li></ul></div></div></div><div id="method-setTarget" class="member ni"><a href="Ext.ComponentLoader.html#method-setTarget" rel="method-setTarget" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ComponentLoader.html" class="definedIn docClass">Ext.ComponentLoader</a><br/><a href="../source/ComponentLoader.html#Ext-ComponentLoader-method-setTarget" class="viewSource">view source</a></div><a name="setTarget"></a><a name="method-setTarget"></a><a href="Ext.ComponentLoader.html#" rel="method-setTarget" class="cls expand">setTarget</a>(
456 <span class="pre">String/Ext.Component target</span>)
457  : void</div><div class="description"><div class="short">Set a {Ext.Component} as the target of this loader. Note that if the target is changed,
458 any active requests will be a...</div><div class="long"><p>Set a {Ext.Component} as the target of this loader. Note that if the target is changed,
459 any active requests will be aborted.</p>
460 <h3 class="pa">Parameters</h3><ul><li><span class="pre">target</span> : String/Ext.Component<div class="sub-desc"><p>The component to be the target of this loader. If a string is passed
461 it will be looked up via its id.</p>
462 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
463 </li></ul></div></div></div><div id="method-startAutoRefresh" class="member inherited"><a href="Ext.ComponentLoader.html#method-startAutoRefresh" rel="method-startAutoRefresh" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-startAutoRefresh" class="viewSource">view source</a></div><a name="startAutoRefresh"></a><a name="method-startAutoRefresh"></a><a href="Ext.ComponentLoader.html#" rel="method-startAutoRefresh" class="cls expand">startAutoRefresh</a>(
464 <span class="pre">Number interval, [Object options]</span>)
465  : void</div><div class="description"><div class="short"><p>Automatically refreshes the content over a specified period.</p>
466 </div><div class="long"><p>Automatically refreshes the content over a specified period.</p>
467 <h3 class="pa">Parameters</h3><ul><li><span class="pre">interval</span> : Number<div class="sub-desc"><p>The interval to refresh in ms.</p>
468 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) The options to pass to the load method. See <a href="Ext.ComponentLoader.html#load" rel="Ext.ComponentLoader#load" class="docClass">load</a></p>
469 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
470 </li></ul></div></div></div><div id="method-stopAutoRefresh" class="member inherited"><a href="Ext.ComponentLoader.html#method-stopAutoRefresh" rel="method-stopAutoRefresh" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-method-stopAutoRefresh" class="viewSource">view source</a></div><a name="stopAutoRefresh"></a><a name="method-stopAutoRefresh"></a><a href="Ext.ComponentLoader.html#" rel="method-stopAutoRefresh" class="cls expand">stopAutoRefresh</a> : void</div><div class="description"><div class="short"><p>Clears any auto refresh. See <a href="Ext.ComponentLoader.html#startAutoRefresh" rel="Ext.ComponentLoader#startAutoRefresh" class="docClass">startAutoRefresh</a>.</p>
471 </div><div class="long"><p>Clears any auto refresh. See <a href="Ext.ComponentLoader.html#startAutoRefresh" rel="Ext.ComponentLoader#startAutoRefresh" class="docClass">startAutoRefresh</a>.</p>
472 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
473 </li></ul></div></div></div><div id="method-suspendEvents" class="member inherited"><a href="Ext.ComponentLoader.html#method-suspendEvents" rel="method-suspendEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-suspendEvents" class="viewSource">view source</a></div><a name="suspendEvents"></a><a name="method-suspendEvents"></a><a href="Ext.ComponentLoader.html#" rel="method-suspendEvents" class="cls expand">suspendEvents</a>(
474 <span class="pre">Boolean queueSuspended</span>)
475  : void</div><div class="description"><div class="short"><p>Suspend the firing of all events. (see <a href="Ext.ComponentLoader.html#resumeEvents" rel="Ext.ComponentLoader#resumeEvents" class="docClass">resumeEvents</a>)</p>
476 </div><div class="long"><p>Suspend the firing of all events. (see <a href="Ext.ComponentLoader.html#resumeEvents" rel="Ext.ComponentLoader#resumeEvents" class="docClass">resumeEvents</a>)</p>
477 <h3 class="pa">Parameters</h3><ul><li><span class="pre">queueSuspended</span> : Boolean<div class="sub-desc"><p>Pass as true to queue up suspended events to be fired
478 after the <a href="Ext.ComponentLoader.html#resumeEvents" rel="Ext.ComponentLoader#resumeEvents" class="docClass">resumeEvents</a> call instead of discarding all suspended events;</p>
479 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
480 </li></ul></div></div></div><div id="method-un" class="member inherited"><a href="Ext.ComponentLoader.html#method-un" rel="method-un" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-un" class="viewSource">view source</a></div><a name="un"></a><a name="method-un"></a><a href="Ext.ComponentLoader.html#" rel="method-un" class="cls expand">un</a>(
481 <span class="pre">String eventName, Function handler, [Object scope]</span>)
482  : void</div><div class="description"><div class="short"><p>Removes an event handler (shorthand for <a href="Ext.ComponentLoader.html#removeListener" rel="Ext.ComponentLoader#removeListener" class="docClass">removeListener</a>.)</p>
483 </div><div class="long"><p>Removes an event handler (shorthand for <a href="Ext.ComponentLoader.html#removeListener" rel="Ext.ComponentLoader#removeListener" class="docClass">removeListener</a>.)</p>
484 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
485 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.ComponentLoader.html#addListener" rel="Ext.ComponentLoader#addListener" class="docClass">addListener</a> call.</b></p>
486 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
487 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
488 </li></ul></div></div></div></div><div class="m-events"><a name="events"></a><div class="definedBy">Defined By</div><h3 class="evt p">Events</h3><div id="event-beforeload" class="member f inherited"><a href="Ext.ComponentLoader.html#event-beforeload" rel="event-beforeload" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-event-beforeload" class="viewSource">view source</a></div><a name="beforeload"></a><a name="event-beforeload"></a><a href="Ext.ComponentLoader.html#" rel="event-beforeload" class="cls expand">beforeload</a>(
489 <span class="pre">Ext.ElementLoader this, Object options</span>)
490 </div><div class="description"><div class="short">Fires before a load request is made to the server.
491 Returning false from an event listener can prevent the load
492 from o...</div><div class="long"><p>Fires before a load request is made to the server.
493 Returning false from an event listener can prevent the load
494 from occurring.</p>
495 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.ElementLoader<div class="sub-desc">
496 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>The options passed to the request</p>
497 </div></li></ul></div></div></div><div id="event-exception" class="member inherited"><a href="Ext.ComponentLoader.html#event-exception" rel="event-exception" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ElementLoader.html" class="definedIn docClass">Ext.ElementLoader</a><br/><a href="../source/ElementLoader.html#Ext-ElementLoader-event-exception" class="viewSource">view source</a></div><a name="exception"></a><a name="event-exception"></a><a href="Ext.ComponentLoader.html#" rel="event-exception" class="cls expand">exception</a>(
498 <span class="pre">Ext.ElementLoader this, Object response, Object options</span>)
499 </div><div class="description"><div class="short"><p>Fires after a successful load.</p>
500 </div><div class="long"><p>Fires after a successful load.</p>
501 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.ElementLoader<div class="sub-desc">
502 </div></li><li><span class="pre">response</span> : Object<div class="sub-desc"><p>The response from the server</p>
503 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>The options passed to the request</p>
504 </div></li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>