1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.tree.TreeLoader</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.tree.TreeLoader-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.tree.TreeLoader-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.tree.TreeLoader-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.tree.TreeLoader-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.tree.TreeLoader
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.tree.TreeLoader
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.tree</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_tree_TreeLoader.js.html">Roo/tree/TreeLoader.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">TreeLoader</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
75 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 A TreeLoader provides for lazy loading of an {<b>link</b> Roo.tree.TreeNode}'s child<br/>nodes from a specified URL. The response must be a javascript Array definition<br/>who's elements are node definition objects. eg:<br/><pre><code><br/>{ success : true,<br/> data : [<br/> <br/> { 'id': 1, 'text': 'A folder Node', 'leaf': false },<br/> { 'id': 2, 'text': 'A leaf Node', 'leaf': true }<br/> ]<br/>}<br/><br/><br/></code></pre><br/><br><br><br/>The old style respose with just an array is still supported, but not recommended.<br/><br><br><br/><br/>A server request is sent, and child nodes are loaded only when a node is expanded.<br/>The loading node's id is passed to the server under the parameter name "node" to<br/>enable the server to produce the correct child nodes.<br/><br><br><br/>To pass extra parameters, an event handler may be attached to the "beforeload"<br/>event, and the parameters specified in the TreeLoader's baseParams property:<br/><pre><code><br/> myTreeLoader.on("beforeload", function(treeLoader, node) {<br/> this.baseParams.category = node.attributes.category;<br/> }, this);<br/></code></pre><<br/>This would pass an HTTP parameter called "category" to the server containing<br/>the value of the Node's "category" attribute.
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.tree.TreeLoader';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo.tree" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.tree.TreeLoader.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.tree.TreeLoader-configs"></a>
113 <table cellspacing="0" class="member-table">
114 <caption>Config Options (Usually are also Properties)</caption>
118 <th class="sig-header" colspan="2">Options</th>
120 <th class="msource-header">Defined By</th>
127 <tr class="config-row expandable config-row-alt0 notInherited">
128 <td class="micon"><a class="exi" href="#expand"> </a></td>
131 <a id="Roo.tree.TreeLoader-cfg-baseAttrs" name=".baseAttrs"></a>
132 <div class="fixedFont">
133 <b class="itemname">baseAttrs</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
139 <div class="short">(optional) An object containing attributes to be added to all nodes<br/>created by this loader.</div>
143 <div class="long">(optional) An object containing attributes to be added to all nodes<br/>created by this loader. If the attributes sent by the server have an attribute in this object,<br/>they take priority.</div>
157 <tr class="config-row expandable config-row-alt1 notInherited">
158 <td class="micon"><a class="exi" href="#expand"> </a></td>
161 <a id="Roo.tree.TreeLoader-cfg-baseParams" name=".baseParams"></a>
162 <div class="fixedFont">
163 <b class="itemname">baseParams</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
169 <div class="short">(optional) An object containing properties which<br/>specify HTTP parameters to be passed to each request for child nodes.</div>
173 <div class="long">(optional) An object containing properties which<br/>specify HTTP parameters to be passed to each request for child nodes.</div>
187 <tr class="config-row expandable config-row-alt0 notInherited">
188 <td class="micon"><a class="exi" href="#expand"> </a></td>
191 <a id="Roo.tree.TreeLoader-cfg-clearOnLoad" name=".clearOnLoad"></a>
192 <div class="fixedFont">
193 <b class="itemname">clearOnLoad</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
199 <div class="short">(optional) Default to true.</div>
203 <div class="long">(optional) Default to true. Remove previously existing<br/>child nodes before loading.</div>
217 <tr class="config-row expandable config-row-alt1 notInherited">
218 <td class="micon"><a class="exi" href="#expand"> </a></td>
221 <a id="Roo.tree.TreeLoader-cfg-dataUrl" name=".dataUrl"></a>
222 <div class="fixedFont">
223 <b class="itemname">dataUrl</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
229 <div class="short">The URL from which to request a Json string which<br/>specifies an array of node definition object representing the child nodes<br/>to be loaded.</div>
233 <div class="long">The URL from which to request a Json string which<br/>specifies an array of node definition object representing the child nodes<br/>to be loaded.</div>
247 <tr class="config-row expandable config-row-alt0">
248 <td class="micon"><a class="exi" href="#expand"> </a></td>
251 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
252 <div class="fixedFont">
253 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
259 <div class="short">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> .</div>
263 <div class="long">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> ..... <br/> } ,<br/> .... <br/> } <br/> </code></pre></div>
271 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
277 <tr class="config-row expandable config-row-alt1 notInherited">
278 <td class="micon"><a class="exi" href="#expand"> </a></td>
281 <a id="Roo.tree.TreeLoader-cfg-queryParam" name=".queryParam"></a>
282 <div class="fixedFont">
283 <b class="itemname">queryParam</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
289 <div class="short">(optional) <br/>Name of the query as it will be passed on the querystring (defaults to 'node')<br/>eg.</div>
293 <div class="long">(optional) <br/>Name of the query as it will be passed on the querystring (defaults to 'node')<br/>eg. the request will be ?node=[id]</div>
307 <tr class="config-row expandable config-row-alt0 notInherited">
308 <td class="micon"><a class="exi" href="#expand"> </a></td>
311 <a id="Roo.tree.TreeLoader-cfg-requestMethod" name=".requestMethod"></a>
312 <div class="fixedFont">
313 <b class="itemname">requestMethod</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
319 <div class="short">either GET or POST<br/>defaults to POST (due to BC)<br/>to be loaded.</div>
323 <div class="long">either GET or POST<br/>defaults to POST (due to BC)<br/>to be loaded.</div>
337 <tr class="config-row expandable config-row-alt1 notInherited">
338 <td class="micon"><a class="exi" href="#expand"> </a></td>
341 <a id="Roo.tree.TreeLoader-cfg-root" name=".root"></a>
342 <div class="fixedFont">
343 <b class="itemname">root</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
349 <div class="short">(optional) Default to false.</div>
353 <div class="long">(optional) Default to false. Use this to read data from an object <br/>property on loading, rather than expecting an array. (eg. more compatible to a standard<br/>Grid query { data : [ .....] }</div>
367 <tr class="config-row expandable config-row-alt0 notInherited">
368 <td class="micon"><a class="exi" href="#expand"> </a></td>
371 <a id="Roo.tree.TreeLoader-cfg-uiProviders" name=".uiProviders"></a>
372 <div class="fixedFont">
373 <b class="itemname">uiProviders</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
379 <div class="short">(optional) An object containing properties which<br/><br/>DEPRECATED - use 'create' event handler to modify attributes - which affect creation.</div>
383 <div class="long">(optional) An object containing properties which<br/><br/>DEPRECATED - use 'create' event handler to modify attributes - which affect creation.<br/>specify custom {<b>link</b> Roo.tree.TreeNodeUI} implementations. If the optional<br/><i>uiProvider</i> attribute of a returned child node is a string rather<br/>than a reference to a TreeNodeUI implementation, this that string value<br/>is used as a property name in the uiProviders object. You can define the provider named<br/>'default' , and this will be used for all nodes (if no uiProvider is delivered by the node data)</div>
407 <!-- ============================== public properties ==================== -->
411 <a id="Roo.tree.TreeLoader-props"></a>
417 <table cellspacing="0" class="member-table">
418 <caption class="Empty">Public Properties - Has None</caption>
424 <!-- ============================== methods summary / details ======================== -->
427 <a id="Roo.tree.TreeLoader-methods"></a>
428 <!-- constructor?? -->
435 <!-- then dynamics first -->
442 <table cellspacing="0" class="member-table">
443 <caption>Public Methods</caption>
445 <th class="sig-header" colspan="2">Method</th>
446 <th class="msource-header">Defined By</th>
456 <tr class="method-row config-row-alt0 expandable notInherited">
457 <td class="micon"><a class="exi" href="#expand"> </a></td>
461 <a id="Roo.tree-method-TreeLoader" name=".TreeLoader"></a>
462 <div class="fixedFont">
463 <span class="attributes">new <B>Roo.tree.</B></span><b class="itemname">TreeLoader</b>
465 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
473 <div class="short">Create a new Roo.tree.TreeLoader</div>
480 Create a new Roo.tree.TreeLoader
483 <dl class="detailList">
484 <dt class="heading">Parameters:</dt>
487 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
490 <dd>A config object containing config properties.</dd>
514 <tr class="method-row config-row-alt1 expandable">
515 <td class="micon"><a class="exi" href="#expand"> </a></td>
519 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
520 <div class="fixedFont">
521 <span class="attributes"></span><b class="itemname">addEvents</b>
523 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
530 <div class="short">Used to define events on this Observable</div>
536 Used to define events on this Observable
543 <dl class="detailList">
544 <dt class="heading">Parameters:</dt>
547 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>object</b>
550 <dd>The object with the events defined</dd>
570 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
576 <tr class="method-row config-row-alt0 expandable">
577 <td class="micon"><a class="exi" href="#expand"> </a></td>
581 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
582 <div class="fixedFont">
583 <span class="attributes"></span><b class="itemname">addListener</b>
585 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
592 <div class="short">Appends an event handler to this component</div>
598 Appends an event handler to this component
605 <dl class="detailList">
606 <dt class="heading">Parameters:</dt>
609 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
612 <dd>The type of event to listen for</dd>
615 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
618 <dd>The method the event invokes</dd>
621 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
624 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
627 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
630 <dd>(optional) An object containing handler configuration<br/>properties. This may contain any of the following properties:<ul><br/><li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li><br/><li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li><br/><li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li><br/><li>buffer {Number} Causes the handler to be scheduled to run in an {<b>link</b> Roo.util.DelayedTask} delayed<br/>by the specified number of milliseconds. If the event fires again within that time, the original<br/>handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li><br/></ul><br><br/><p><br/><b>Combining Options</b><br><br/>Using the options argument, it is possible to combine different types of listeners:<br><br/><br><br/>A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<br/> <pre><code><br/> el.on('click', this.onClick, this, {<br/> single: true,<br/> delay: 100,<br/> forumId: 4<br/> });<br/> </code></pre><br/><p><br/><b>Attaching multiple handlers in 1 call</b><br><br/>The method also allows for a single argument to be passed which is a config object containing properties<br/>which specify multiple handlers.<br/><pre><code><br/> el.on({<br/> 'click': {<br/> fn: this.onClick,<br/> scope: this,<br/> delay: 100<br/> }, <br/> 'mouseover': {<br/> fn: this.onMouseOver,<br/> scope: this<br/> },<br/> 'mouseout': {<br/> fn: this.onMouseOut,<br/> scope: this<br/> }<br/> });<br/> </code></pre><br/><p><br/>Or a shorthand syntax which passes the same scope object to all handlers:<br/> <pre><code><br/> el.on({<br/> 'click': this.onClick,<br/> 'mouseover': this.onMouseOver,<br/> 'mouseout': this.onMouseOut,<br/> scope: this<br/> });<br/> </code></pre></dd>
650 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
656 <tr class="method-row config-row-alt1 expandable">
657 <td class="micon"><a class="exi" href="#expand"> </a></td>
661 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
662 <div class="fixedFont">
663 <span class="attributes"></span><b class="itemname">fireEvent</b>
665 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a> <B><i>args</i></B>)
671 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
680 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
686 Fires the specified event with the passed parameters (minus the event name).
693 <dl class="detailList">
694 <dt class="heading">Parameters:</dt>
697 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
703 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a></span> <b>args</b>
706 <dd>Variable number of parameters are passed to handlers</dd>
714 <dl class="detailList">
715 <dt class="heading">Returns:</dt>
717 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> returns false if any of the handlers return false otherwise it returns true</dd>
733 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
739 <tr class="method-row config-row-alt0 expandable">
740 <td class="micon"><a class="exi" href="#expand"> </a></td>
744 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
745 <div class="fixedFont">
746 <span class="attributes"></span><b class="itemname">hasListener</b>
748 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
754 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
763 <div class="short">Checks to see if this object has any listeners for a specified event</div>
769 Checks to see if this object has any listeners for a specified event
776 <dl class="detailList">
777 <dt class="heading">Parameters:</dt>
780 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
783 <dd>The name of the event to check for</dd>
791 <dl class="detailList">
792 <dt class="heading">Returns:</dt>
794 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the event is being listened for, else false</dd>
810 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
816 <tr class="method-row config-row-alt1 expandable notInherited">
817 <td class="micon"><a class="exi" href="#expand"> </a></td>
821 <a id="Roo.tree.TreeLoader-method-load" name=".load"></a>
822 <div class="fixedFont">
823 <span class="attributes"></span><b class="itemname">load</b>
825 (<a href="./Roo.tree.TreeNode.html#constructor" roo:cls="Roo.tree.TreeNode.html#constructor">Roo.tree.TreeNode</a> <B><i>node</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>callback</i></B>)
832 <div class="short">Load an {<b>link</b> Roo.tree.TreeNode} from the URL specified in the constructor.</div>
838 Load an {<b>link</b> Roo.tree.TreeNode} from the URL specified in the constructor.<br/>This is called automatically when a node is expanded, but may be used to reload<br/>a node (or append new children if the {<b>link</b> <b>clearOnLoad</b>} option is false.)
845 <dl class="detailList">
846 <dt class="heading">Parameters:</dt>
849 <span class="fixedFont"><a href="./Roo.tree.TreeNode.html#constructor" roo:cls="Roo.tree.TreeNode.html#constructor">Roo.tree.TreeNode</a></span> <b>node</b>
855 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>callback</b>
884 <tr class="method-row config-row-alt0 expandable">
885 <td class="micon"><a class="exi" href="#expand"> </a></td>
889 <a id="Roo.util.Observable-method-on" name=".on"></a>
890 <div class="fixedFont">
891 <span class="attributes"></span><b class="itemname">on</b>
893 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
900 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
906 Appends an event handler to this element (shorthand for addListener)
913 <dl class="detailList">
914 <dt class="heading">Parameters:</dt>
917 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
920 <dd>The type of event to listen for</dd>
923 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
926 <dd>The method the event invokes</dd>
929 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
932 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
935 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
958 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
964 <tr class="method-row config-row-alt1 expandable">
965 <td class="micon"><a class="exi" href="#expand"> </a></td>
969 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
970 <div class="fixedFont">
971 <span class="attributes"></span><b class="itemname">purgeListeners</b>
980 <div class="short">Removes all listeners for this object</div>
986 Removes all listeners for this object
1007 <td class="msource">
1009 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1015 <tr class="method-row config-row-alt0 expandable">
1016 <td class="micon"><a class="exi" href="#expand"> </a></td>
1020 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
1021 <div class="fixedFont">
1022 <span class="attributes"></span><b class="itemname">removeListener</b>
1024 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1031 <div class="short">Removes a listener</div>
1044 <dl class="detailList">
1045 <dt class="heading">Parameters:</dt>
1048 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1051 <dd>The type of event to listen for</dd>
1054 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1057 <dd>The handler to remove</dd>
1060 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1063 <dd>(optional) The scope (this object) for the handler</dd>
1081 <td class="msource">
1083 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1089 <tr class="method-row config-row-alt1 expandable">
1090 <td class="micon"><a class="exi" href="#expand"> </a></td>
1094 <a id="Roo.util.Observable-method-un" name=".un"></a>
1095 <div class="fixedFont">
1096 <span class="attributes"></span><b class="itemname">un</b>
1098 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1105 <div class="short">Removes a listener (shorthand for removeListener)</div>
1111 Removes a listener (shorthand for removeListener)
1118 <dl class="detailList">
1119 <dt class="heading">Parameters:</dt>
1122 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1125 <dd>The type of event to listen for</dd>
1128 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1131 <dd>The handler to remove</dd>
1134 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1137 <dd>(optional) The scope (this object) for the handler</dd>
1155 <td class="msource">
1157 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1166 <!-- ============================== events summary / details ======================== -->
1169 <a id="Roo.tree.TreeLoader-events"></a>
1178 <table cellspacing="0" class="member-table">
1179 <caption>Events</caption>
1182 <th class="sig-header" colspan="2">Event</th>
1183 <th class="msource-header">Defined By</th>
1192 <tr class="method-row expandable config-row-alt0 notInherited">
1193 <td class="micon"><a class="exi" href="#expand"> </a></td>
1196 <a id="Roo.tree.TreeLoader-event-*beforeload"></a>
1198 <div class="fixedFont">
1199 <b class="itemname">beforeload</b> (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>This</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>node</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>callback</i></B>)
1205 <div class="short">Fires before a network request is made to retrieve the Json text which specifies a node's children.
1211 Fires before a network request is made to retrieve the Json text which specifies a node's children.
1217 <dl class="detailList">
1218 <dt class="heading">Parameters:</dt>
1221 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>This</b>
1224 <dd>TreeLoader object.</dd>
1227 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>node</b>
1230 <dd>The {<b>link</b> Roo.tree.TreeNode} object being loaded.</dd>
1233 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>callback</b>
1236 <dd>The callback function specified in the {<b>link</b> <b>load</b>} call.</dd>
1254 <td class="msource">
1259 <tr class="method-row expandable config-row-alt1 notInherited">
1260 <td class="micon"><a class="exi" href="#expand"> </a></td>
1263 <a id="Roo.tree.TreeLoader-event-*create"></a>
1265 <div class="fixedFont">
1266 <b class="itemname">create</b> (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>This</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>attr</i></B>)
1272 <div class="short">Fires before a node is created, enabling you to return custom Node types
1278 Fires before a node is created, enabling you to return custom Node types
1284 <dl class="detailList">
1285 <dt class="heading">Parameters:</dt>
1288 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>This</b>
1291 <dd>TreeLoader object.</dd>
1294 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>attr</b>
1297 <dd>- the data returned from the AJAX call (modify it to suit)</dd>
1315 <td class="msource">
1320 <tr class="method-row expandable config-row-alt0 notInherited">
1321 <td class="micon"><a class="exi" href="#expand"> </a></td>
1324 <a id="Roo.tree.TreeLoader-event-*load"></a>
1326 <div class="fixedFont">
1327 <b class="itemname">load</b> (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>This</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>node</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>response</i></B>)
1333 <div class="short">Fires when the node has been successfuly loaded.
1339 Fires when the node has been successfuly loaded.
1345 <dl class="detailList">
1346 <dt class="heading">Parameters:</dt>
1349 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>This</b>
1352 <dd>TreeLoader object.</dd>
1355 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>node</b>
1358 <dd>The {<b>link</b> Roo.tree.TreeNode} object being loaded.</dd>
1361 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>response</b>
1364 <dd>The response object containing the data from the server.</dd>
1382 <td class="msource">
1387 <tr class="method-row expandable config-row-alt1 notInherited">
1388 <td class="micon"><a class="exi" href="#expand"> </a></td>
1391 <a id="Roo.tree.TreeLoader-event-*loadexception"></a>
1393 <div class="fixedFont">
1394 <b class="itemname">loadexception</b> (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>This</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>node</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>response</i></B>)
1400 <div class="short">Fires if the network request failed.
1406 Fires if the network request failed.
1412 <dl class="detailList">
1413 <dt class="heading">Parameters:</dt>
1416 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>This</b>
1419 <dd>TreeLoader object.</dd>
1422 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>node</b>
1425 <dd>The {<b>link</b> Roo.tree.TreeNode} object being loaded.</dd>
1428 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>response</b>
1431 <dd>The response object containing the data from the server.</dd>
1449 <td class="msource">
1461 <!-- ============================== footer ================================= -->
1462 <div class="fineprint" style="clear:both">
1464 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Apr 11 2014 11:35:17 GMT+0800 (HKT)
1466 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>