Roo.util.Observable
Roo.tree.TreeLoader 

		   

Class Roo.tree.TreeLoader

Package:Roo.tree
Defined In: Roo/tree/TreeLoader.js.
Class:TreeLoader
Extends: Roo.util.Observable
A TreeLoader provides for lazy loading of an {link Roo.tree.TreeNode}'s child
nodes from a specified URL. The response must be a javascript Array definition
who's elements are node definition objects. eg:

{ success : true,
data : [

{ 'id': 1, 'text': 'A folder Node', 'leaf': false },
{ 'id': 2, 'text': 'A leaf Node', 'leaf': true }
]
}






The old style respose with just an array is still supported, but not recommended.




A server request is sent, and child nodes are loaded only when a node is expanded.
The loading node's id is passed to the server under the parameter name "node" to
enable the server to produce the correct child nodes.



To pass extra parameters, an event handler may be attached to the "beforeload"
event, and the parameters specified in the TreeLoader's baseParams property:

myTreeLoader.on("beforeload", function(treeLoader, node) {
this.baseParams.category = node.attributes.category;
}, this);
<
This would pass an HTTP parameter called "category" to the server containing
the value of the Node's "category" attribute.
Class Comments / Notes => [Add Your comment/notes about this class]
Config Options (Usually are also Properties)
Options Defined By
Public Properties - Has None
Public Methods
Method Defined By
Events
Event Defined By
Documentation generated by Introspection Doc Generator on Fri Jul 13 2018 14:10:55 GMT+0800 (HKT) Based on JsDoc Toolkit