Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / output / Ext.ux.tree.XmlTreeLoader.html
1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.ux.tree.XmlTreeLoader-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.ux.tree.XmlTreeLoader-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.ux.tree.XmlTreeLoader-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="inner-link" href="#Ext.ux.tree.XmlTreeLoader-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>&#13;<a class="bookmark" href="../docs/?class=Ext.ux.tree.XmlTreeLoader"><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"><a href="output/Ext.tree.TreeLoader.html" ext:member="" ext:cls="Ext.tree.TreeLoader">TreeLoader</a>&#13;&nbsp;&nbsp;&nbsp;&nbsp;<img src="resources/elbow-end.gif">XmlTreeLoader</pre></div><h1>Class <a href="source/XmlTreeLoader.html#cls-Ext.ux.tree.XmlTreeLoader">Ext.ux.tree.XmlTreeLoader</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.ux.tree</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">XmlTreeLoader.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/XmlTreeLoader.html#cls-Ext.ux.tree.XmlTreeLoader">XmlTreeLoader</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.tree.TreeLoader.html" ext:cls="Ext.tree.TreeLoader" ext:member="">TreeLoader</a></td></tr></table><div class="description"><p>A TreeLoader that can convert an XML document into a hierarchy of <a href="output/Ext.tree.TreeNode.html" ext:cls="Ext.tree.TreeNode">Ext.tree.TreeNode</a>s.
2 Any text value included as a text node in the XML will be added to the parent node as an attribute
3 called <tt>innerText</tt>.  Also, the tag name of each XML node will be added to the tree node as
4 an attribute called <tt>tagName</tt>.</p>
5 <p>By default, this class expects that your source XML will provide the necessary attributes on each
6 node as expected by the <a href="output/Ext.tree.TreePanel.html" ext:cls="Ext.tree.TreePanel">Ext.tree.TreePanel</a> to display and load properly.  However, you can
7 provide your own custom processing of node attributes by overriding the <a href="output/Ext.ux.tree.XmlTreeLoader.html#Ext.ux.tree.XmlTreeLoader-processNode" ext:member="processNode" ext:cls="Ext.ux.tree.XmlTreeLoader">processNode</a> method
8 and modifying the attributes as needed before they are used to create the associated TreeNode.</p></div><div class="hr"></div><a id="Ext.ux.tree.XmlTreeLoader-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.tree.TreeLoader-baseAttrs"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-baseAttrs">baseAttrs</a></b> : Object<div class="mdesc"><div class="short">An object containing attributes to be added to all nodes&#13;
9 created by this loader. If the attributes sent by the serve...</div><div class="long">An object containing attributes to be added to all nodes\r
10 created by this loader. If the attributes sent by the server have an attribute in this object,\r
11 they take priority.</div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#baseAttrs" ext:member="#baseAttrs" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-baseParams"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-baseParams">baseParams</a></b> : Object<div class="mdesc">An object containing properties which\r
12 specify HTTP parameters to be passed to each request for child nodes.</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#baseParams" ext:member="#baseParams" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-clearOnLoad"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-clearOnLoad">clearOnLoad</a></b> : Boolean<div class="mdesc">Default to true. Remove previously existing\r
13 child nodes before loading.</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#clearOnLoad" ext:member="#clearOnLoad" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-dataUrl"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-dataUrl">dataUrl</a></b> : String<div class="mdesc"><div class="short">The URL from which to request a Json string which&#13;
14 specifies an array of node definition objects representing the chi...</div><div class="long">The URL from which to request a Json string which\r
15 specifies an array of node definition objects representing the child nodes\r
16 to be loaded.</div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#dataUrl" ext:member="#dataUrl" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-directFn"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-directFn">directFn</a></b> : Function<div class="mdesc">Function to call when executing a request.</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#directFn" ext:member="#directFn" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></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
17 object during initialization.  This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
18 object during initialization.  This should be a valid listeners config object as specified in the
19 <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>
20 <br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p>
21 <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
22 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
23 <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
24 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
25 has been rendered. A plugin can simplify this step:<pre><code><i>// Plugin is configured <b>with</b> a listeners config object.</i>
26 <i>// The Component is appended to the argument list of all handler functions.</i>
27 Ext.DomObserver = Ext.extend(Object, {
28     constructor: <b>function</b>(config) {
29         this.listeners = config.listeners ? config.listeners : config;
30     },
31
32     <i>// Component passes itself into plugin&#39;s init method</i>
33     init: <b>function</b>(c) {
34         <b>var</b> p, l = this.listeners;
35         <b>for</b> (p <b>in</b> l) {
36             <b>if</b> (Ext.isFunction(l[p])) {
37                 l[p] = this.createHandler(l[p], c);
38             } <b>else</b> {
39                 l[p].fn = this.createHandler(l[p].fn, c);
40             }
41         }
42
43         <i>// Add the listeners to the Element immediately following the render call</i>
44         c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() {
45             <b>var</b> e = c.getEl();
46             <b>if</b> (e) {
47                 e.on(l);
48             }
49         });
50     },
51
52     createHandler: <b>function</b>(fn, c) {
53         <b>return</b> <b>function</b>(e) {
54             fn.call(this, e, c);
55         };
56     }
57 });
58
59 <b>var</b> combo = <b>new</b> Ext.form.ComboBox({
60
61     <i>// Collapse combo when its element is clicked on</i>
62     plugins: [ <b>new</b> Ext.DomObserver({
63         click: <b>function</b>(evt, comp) {
64             comp.collapse();
65         }
66     })],
67     store: myStore,
68     typeAhead: true,
69     mode: <em>'local'</em>,
70     triggerAction: <em>'all'</em>
71 });</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><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-paramOrder"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-paramOrder">paramOrder</a></b> : Array/String<div class="mdesc"><div class="short">Defaults to undefined. Only used when using directFn.&#13;
72 A list of params to be executed&#13;
73 server side.  Specify the par...</div><div class="long">Defaults to <tt>undefined</tt>. Only used when using directFn.\r
74 A list of params to be executed\r
75 server side.  Specify the params in the order in which they must be executed on the server-side\r
76 as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,\r
77 comma, or pipe. For example,\r
78 any of the following would be acceptable:<pre><code>paramOrder: [<em>'param1'</em>,<em>'param2'</em>,<em>'param3'</em>]\r
79 paramOrder: <em>'param1 param2 param3'</em>\r
80 paramOrder: <em>'param1,param2,param3'</em>\r
81 paramOrder: <em>'param1|param2|param'</em></code></pre></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#paramOrder" ext:member="#paramOrder" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-paramsAsHash"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-paramsAsHash">paramsAsHash</a></b> : Boolean<div class="mdesc"><div class="short">Only used when using directFn.&#13;
82 Send parameters as a collection of named arguments (defaults to false). Providing a&#13;
83 ...</div><div class="long">Only used when using directFn.\r
84 Send parameters as a collection of named arguments (defaults to <tt>false</tt>). Providing a\r
85 <tt><a href="output/Ext.tree.TreeLoader.html#Ext.tree.TreeLoader-paramOrder" ext:member="paramOrder" ext:cls="Ext.tree.TreeLoader">paramOrder</a></tt> nullifies this configuration.</div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#paramsAsHash" ext:member="#paramsAsHash" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-preloadChildren"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-preloadChildren">preloadChildren</a></b> : Boolean<div class="mdesc">If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#preloadChildren" ext:member="#preloadChildren" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-requestMethod"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-requestMethod">requestMethod</a></b> : String<div class="mdesc">The HTTP request method for loading data (defaults to the value of <a href="output/Ext.Ajax.html#Ext.Ajax-method" ext:member="method" ext:cls="Ext.Ajax">Ext.Ajax.method</a>).</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#requestMethod" ext:member="#requestMethod" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-uiProviders"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-uiProviders">uiProviders</a></b> : Object<div class="mdesc"><div class="short">An object containing properties which&#13;
86 specify custom Ext.tree.TreeNodeUI implementations. If the optional&#13;
87 uiProvide...</div><div class="long">An object containing properties which\r
88 specify custom <a href="output/Ext.tree.TreeNodeUI.html" ext:cls="Ext.tree.TreeNodeUI">Ext.tree.TreeNodeUI</a> implementations. If the optional\r
89 <i>uiProvider</i> attribute of a returned child node is a string rather\r
90 than a reference to a TreeNodeUI implementation, then that string value\r
91 is used as a property name in the uiProviders object.</div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#uiProviders" ext:member="#uiProviders" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr><tr class="config-row  inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-url"></a><b><a href="source/TreeLoader.html#cfg-Ext.tree.TreeLoader-url">url</a></b> : String<div class="mdesc">Equivalent to <a href="output/Ext.tree.TreeLoader.html#Ext.tree.TreeLoader-dataUrl" ext:member="dataUrl" ext:cls="Ext.tree.TreeLoader">dataUrl</a>.</div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#url" ext:member="#url" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr></tbody></table><a id="Ext.ux.tree.XmlTreeLoader-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.ux.tree.XmlTreeLoader-XML_NODE_ELEMENT"></a><b><a href="source/XmlTreeLoader.html#prop-Ext.ux.tree.XmlTreeLoader-XML_NODE_ELEMENT">XML_NODE_ELEMENT</a></b> : Number<div class="mdesc">XML element node (value 1, read-only)</div></td><td class="msource">XmlTreeLoader</td></tr><tr class="property-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.tree.XmlTreeLoader-XML_NODE_TEXT"></a><b><a href="source/XmlTreeLoader.html#prop-Ext.ux.tree.XmlTreeLoader-XML_NODE_TEXT">XML_NODE_TEXT</a></b> : Number<div class="mdesc">XML text node (value 3, read-only)</div></td><td class="msource">XmlTreeLoader</td></tr></tbody></table><a id="Ext.ux.tree.XmlTreeLoader-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.ux.tree.XmlTreeLoader-XmlTreeLoader"></a><b><a href="source/XmlTreeLoader.html#cls-Ext.ux.tree.XmlTreeLoader">XmlTreeLoader</a></b>(&nbsp;<code>Object&nbsp;config</code>&nbsp;)
92     <div class="mdesc"><div class="short">Creates a new XmlTreeloader.</div><div class="long">Creates a new XmlTreeloader.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>config</code> : Object<div class="sub-desc">A config object containing config properties.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">XmlTreeLoader</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&nbsp;object</code>&nbsp;)
93     :
94                                         void<div class="mdesc"><div class="short">Used to define events on this Observable</div><div class="long">Used to define events on this Observable<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</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;)
95     :
96                                         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.
97 <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.
98 properties. This may contain any of the following properties:<ul>
99 <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
100 <b>If omitted, defaults to the object which fired the event.</b></div></li>
101 <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>
102 <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>
103 <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
104 by the specified number of milliseconds. If the event fires again within that time, the original
105 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
106 <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>
107 if the event was bubbled up from a child Observable.</div></li>
108 </ul><br>
109 <p>
110 <b>Combining Options</b><br>
111 Using the options argument, it is possible to combine different types of listeners:<br>
112 <br>
113 A delayed, one-time listener.
114 <pre><code>myDataView.on(<em>'click'</em>, this.onClick, this, {
115     single: true,
116     delay: 100
117 });</code></pre>
118 <p>
119 <b>Attaching multiple handlers in 1 call</b><br>
120 The method also allows for a single argument to be passed which is a config object containing properties
121 which specify multiple handlers.
122 <p>
123 <pre><code>myGridPanel.on({
124     <em>'click'</em> : {
125         fn: this.onClick,
126         scope: this,
127         delay: 100
128     },
129     <em>'mouseover'</em> : {
130         fn: this.onMouseOver,
131         scope: this
132     },
133     <em>'mouseout'</em> : {
134         fn: this.onMouseOut,
135         scope: this
136     }
137 });</code></pre>
138 <p>
139 Or a shorthand syntax:<br>
140 <pre><code>myGridPanel.on({
141     <em>'click'</em> : this.onClick,
142     <em>'mouseover'</em> : this.onMouseOver,
143     <em>'mouseout'</em> : this.onMouseOut,
144      scope: this
145 });</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.tree.TreeLoader-createNode"></a><b><a href="source/TreeLoader.html#method-Ext.tree.TreeLoader-createNode">createNode</a></b>(&nbsp;<code>attr&nbsp;{Object}</code>&nbsp;)
146     :
147                                         void<div class="mdesc"><div class="short">Override this function for custom TreeNode node implementation, or to&#13;
148 modify the attributes at creation time.&#13;
149 Examp...</div><div class="long"><p>Override this function for custom TreeNode node implementation, or to\r
150 modify the attributes at creation time.</p>\r
151 Example:<pre><code><b>new</b> Ext.tree.TreePanel({\r
152     ...\r
153     <b>new</b> Ext.tree.TreeLoader({\r
154         url: <em>'dataUrl'</em>,\r
155         createNode: <b>function</b>(attr) {\r
156 <i>//          Allow consolidation consignments to have\r</i>
157 <i>//          consignments dropped into them.\r</i>
158             <b>if</b> (attr.isConsolidation) {\r
159                 attr.iconCls = <em>'x-consol'</em>,\r
160                 attr.allowDrop = true;\r
161             }\r
162             <b>return</b> Ext.tree.TreeLoader.prototype.call(this, attr);\r
163         }\r
164     }),\r
165     ...\r
166 });</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>{Object}</code> : attr<div class="sub-desc">The attributes from which to create the new node.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#createNode" ext:member="#createNode" ext:cls="Ext.tree.TreeLoader">TreeLoader</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>Object&nbsp;events</code>&nbsp;)
167     :
168                                         void<div class="mdesc"><div class="short">Used to enable bubbling of events</div><div class="long">Used to enable bubbling of events<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>events</code> : Object<div class="sub-desc"></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;)
169     :
170                                         Boolean<div class="mdesc"><div class="short">Fires the specified event with the passed parameters (minus the event name).
171 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>
172 <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>)
173 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 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;)
174     :
175                                         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 inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-load"></a><b><a href="source/TreeLoader.html#method-Ext.tree.TreeLoader-load">load</a></b>(&nbsp;<code>Ext.tree.TreeNode&nbsp;node</code>,&nbsp;<code>Function&nbsp;callback</code>,&nbsp;<code>(Object)&nbsp;scope</code>&nbsp;)
176     :
177                                         void<div class="mdesc"><div class="short">Load an Ext.tree.TreeNode from the URL specified in the constructor.&#13;
178 This is called automatically when a node is exp...</div><div class="long">Load an <a href="output/Ext.tree.TreeNode.html" ext:cls="Ext.tree.TreeNode">Ext.tree.TreeNode</a> from the URL specified in the constructor.\r
179 This is called automatically when a node is expanded, but may be used to reload\r
180 a node (or append new children if the <a href="output/Ext.tree.TreeLoader.html#Ext.tree.TreeLoader-clearOnLoad" ext:member="clearOnLoad" ext:cls="Ext.tree.TreeLoader">clearOnLoad</a> option is false.)<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>node</code> : Ext.tree.TreeNode<div class="sub-desc"></div></li><li><code>callback</code> : Function<div class="sub-desc"></div></li><li><code>scope</code> : (Object)<div class="sub-desc"></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#load" ext:member="#load" ext:cls="Ext.tree.TreeLoader">TreeLoader</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-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;)
181     :
182                                         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.
183 <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>()
184     :
185                                         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 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;)
186     :
187                                         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;)
188     :
189                                         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>()
190     :
191                                         void<div class="mdesc"><div class="short">Resume firing events. (see suspendEvents)
192 If events were suspended using the queueSuspended parameter, then all
193 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>)
194 If events were suspended using the <tt><b>queueSuspended</b></tt> parameter, then all
195 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 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;)
196     :
197                                         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
198 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;)
199     :
200                                         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></tbody></table><a id="Ext.ux.tree.XmlTreeLoader-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 inherited"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.tree.TreeLoader-beforeload"></a><b><a href="source/TreeLoader.html#event-Ext.tree.TreeLoader-beforeload">beforeload</a></b> :
201                                       (&nbsp;<code>Object&nbsp;This</code>,&nbsp;<code>Object&nbsp;node</code>,&nbsp;<code>Object&nbsp;callback</code>&nbsp;)
202     <div class="mdesc"><div class="short">Fires before a network request is made to retrieve the Json text which specifies a node's children.</div><div class="long">Fires before a network request is made to retrieve the Json text which specifies a node's children.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>This</code> : Object<div class="sub-desc">TreeLoader object.</div></li><li><code>node</code> : Object<div class="sub-desc">The <a href="output/Ext.tree.TreeNode.html" ext:cls="Ext.tree.TreeNode">Ext.tree.TreeNode</a> object being loaded.</div></li><li><code>callback</code> : Object<div class="sub-desc">The callback function specified in the <a href="output/Ext.tree.TreeLoader.html#Ext.tree.TreeLoader-load" ext:member="load" ext:cls="Ext.tree.TreeLoader">load</a> call.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#beforeload" ext:member="#beforeload" ext:cls="Ext.tree.TreeLoader">TreeLoader</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.tree.TreeLoader-load"></a><b><a href="source/TreeLoader.html#event-Ext.tree.TreeLoader-load">load</a></b> :
203                                       (&nbsp;<code>Object&nbsp;This</code>,&nbsp;<code>Object&nbsp;node</code>,&nbsp;<code>Object&nbsp;response</code>&nbsp;)
204     <div class="mdesc"><div class="short">Fires when the node has been successfuly loaded.</div><div class="long">Fires when the node has been successfuly loaded.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>This</code> : Object<div class="sub-desc">TreeLoader object.</div></li><li><code>node</code> : Object<div class="sub-desc">The <a href="output/Ext.tree.TreeNode.html" ext:cls="Ext.tree.TreeNode">Ext.tree.TreeNode</a> object being loaded.</div></li><li><code>response</code> : Object<div class="sub-desc">The response object containing the data from the server.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#load" ext:member="#load" ext:cls="Ext.tree.TreeLoader">TreeLoader</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.tree.TreeLoader-loadexception"></a><b><a href="source/TreeLoader.html#event-Ext.tree.TreeLoader-loadexception">loadexception</a></b> :
205                                       (&nbsp;<code>Object&nbsp;This</code>,&nbsp;<code>Object&nbsp;node</code>,&nbsp;<code>Object&nbsp;response</code>&nbsp;)
206     <div class="mdesc"><div class="short">Fires if the network request failed.</div><div class="long">Fires if the network request failed.<div class="mdetail-params"><strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong><ul><li><code>This</code> : Object<div class="sub-desc">TreeLoader object.</div></li><li><code>node</code> : Object<div class="sub-desc">The <a href="output/Ext.tree.TreeNode.html" ext:cls="Ext.tree.TreeNode">Ext.tree.TreeNode</a> object being loaded.</div></li><li><code>response</code> : Object<div class="sub-desc">The response object containing the data from the server.</div></li></ul></div></div></div></td><td class="msource"><a href="output/Ext.tree.TreeLoader.html#loadexception" ext:member="#loadexception" ext:cls="Ext.tree.TreeLoader">TreeLoader</a></td></tr></tbody></table></div>