Roo.util.Observable Roo.tree.TreeLoader
Package: | Roo.tree |
Defined In: | Roo/tree/TreeLoader.js. |
Class: | TreeLoader |
Extends: | Roo.util.Observable |
{ success : true,
data : [
{ 'id': 1, 'text': 'A folder Node', 'leaf': false },
{ 'id': 2, 'text': 'A leaf Node', 'leaf': true }
]
}
myTreeLoader.on("beforeload", function(treeLoader, node) {
this.baseParams.category = node.attributes.category;
}, this);
<Options | Defined By | |
---|---|---|
baseAttrs : Object
(optional) An object containing attributes to be added to all nodes
created by this loader.
(optional) An object containing attributes to be added to all nodes
created by this loader. If the attributes sent by the server have an attribute in this object, they take priority. |
Roo.tree.TreeLoader | |
baseParams : Object
(optional) An object containing properties which
specify HTTP parameters to be passed to each request for child nodes.
(optional) An object containing properties which
specify HTTP parameters to be passed to each request for child nodes. |
Roo.tree.TreeLoader | |
clearOnLoad : Boolean
(optional) Default to true.
(optional) Default to true. Remove previously existing
child nodes before loading. |
Roo.tree.TreeLoader | |
dataUrl : String
The URL from which to request a Json string which
specifies an array of node definition object representing the child nodes to be loaded.
The URL from which to request a Json string which
specifies an array of node definition object representing the child nodes to be loaded. |
Roo.tree.TreeLoader | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
queryParam : String
(optional)
Name of the query as it will be passed on the querystring (defaults to 'node') eg.
(optional)
Name of the query as it will be passed on the querystring (defaults to 'node') eg. the request will be ?node=[id] |
Roo.tree.TreeLoader | |
requestMethod : String
either GET or POST
defaults to POST (due to BC) to be loaded.
either GET or POST
defaults to POST (due to BC) to be loaded. |
Roo.tree.TreeLoader | |
root : String
(optional) Default to false.
(optional) Default to false. Use this to read data from an object
property on loading, rather than expecting an array. (eg. more compatible to a standard Grid query { data : [ .....] } |
Roo.tree.TreeLoader | |
uiProviders : Object
(optional) An object containing properties which
DEPRECATED - use 'create' event handler to modify attributes - which affect creation.
(optional) An object containing properties which
DEPRECATED - use 'create' event handler to modify attributes - which affect creation. specify custom {link Roo.tree.TreeNodeUI} implementations. If the optional uiProvider attribute of a returned child node is a string rather than a reference to a TreeNodeUI implementation, this that string value is used as a property name in the uiProviders object. You can define the provider named 'default' , and this will be used for all nodes (if no uiProvider is delivered by the node data) |
Roo.tree.TreeLoader |
Method | Defined By | |
---|---|---|
new Roo.tree.TreeLoader
(Object config)
Create a new Roo.tree.TreeLoader
Create a new Roo.tree.TreeLoader
|
||
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
Roo.util.Observable | ||
load
(Roo.tree.TreeNode node, Function callback)
Load an {link Roo.tree.TreeNode} from the URL specified in the constructor.
Load an {link Roo.tree.TreeNode} from the URL specified in the constructor.
This is called automatically when a node is expanded, but may be used to reload a node (or append new children if the {link clearOnLoad} option is false.)
|
Roo.tree.TreeLoader | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Roo.util.Observable | ||
Roo.util.Observable |