ObservableTreeLoader
SlingTreeLoader
| Package: | CQ.tree |
| Class: | SlingTreeLoader |
| Extends: | CQ.Ext.tree.TreeLoader |
| Clientlib: | cq.widgets |
| Config Options | Defined By | |
|---|---|---|
|
baseAttrs : Object (optional) An object containing attributes to be added to all nodes created by this loader. If the attributes sent by...
(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.
|
TreeLoader | |
|
baseParams : Object
(optional) An object containing properties which specify HTTP parameters to be passed to each request for child nodes.
|
TreeLoader | |
|
clearOnLoad : Boolean
(optional) Default to true. Remove previously existing child nodes before loading.
|
TreeLoader | |
|
dataUrl : String The URL from which to request a Json string which specifies an array of node definition objects representing the chil...
The URL from which to request a Json string which specifies an array of node definition objects representing the child nodes to be loaded.
|
TreeLoader | |
|
directFn : Function
Function to call when executing a request.
|
TreeLoader | |
|
filterFn : Function Custom filter function for filtering child nodes. This is being called with (String name, Object obj) with the raw js...
Custom filter function for filtering child nodes. This is being called with (String name, Object obj) with the raw json child node object from the response. Return null to not show this node in the tree. Runs after name + type includes and excludes have been handled.
|
SlingTreeLoader | |
|
nameExcludes : Array
List of node names to exclude from being shown in the tree. Defaults to ["rep:policy"].
|
SlingTreeLoader | |
|
nodeParameter : String The name of the parameter sent to the server which contains the identifier of the node. Defaults to 'node'.
The name of the parameter sent to the server which contains the identifier of the node. Defaults to 'node'.
|
TreeLoader | |
|
paramOrder : Array/String Defaults to undefined. Only used when using directFn. Specifies the params in the order in which they must be passed ...
Defaults to undefined. Only used when using directFn. Specifies the params in the order in which they must be passed to the server-side Direct method as either (1) an Array of String values, or (2) a String of params delimited by either whitespace, comma, or pipe. For example, any of the following would be acceptable:
|
TreeLoader | |
|
paramsAsHash : Boolean Only used when using directFn. Send parameters as a collection of named arguments (defaults to false). Providing a pa...
Only used when using directFn. Send parameters as a collection of named arguments (defaults to false). Providing a paramOrder nullifies this configuration.
|
TreeLoader | |
|
path : String
Base repository path for the tree. Defaults to the root "/".
|
SlingTreeLoader | |
|
preloadChildren : Boolean
If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.
|
TreeLoader | |
|
qtipProperty : String
Name of the JCR property that should be used as qtip for the node. Defaults to "jcr:description".
|
SlingTreeLoader | |
|
requestMethod : String The HTTP request method for loading data (defaults to the value of CQ.Ext.Ajax.method).
The HTTP request method for loading data (defaults to the value of CQ.Ext.Ajax.method).
|
TreeLoader | |
|
titleProperty : String
Name of the JCR property that should be used as title for the node. Defaults to "jcr:title".
|
SlingTreeLoader | |
|
typeExcludes : Array
List of node types and/or resource types to exclude from being shown in the tree.
|
SlingTreeLoader | |
|
typeIncludes : Array List of node types and/or resource types to include. This has only effect if this array contains at least one element...
List of node types and/or resource types to include. This has only effect if this array contains at least one element. All non-matching types will be skipped then.
|
SlingTreeLoader | |
|
uiProviders : Object (optional) An object containing properties which specify custom CQ.Ext.tree.TreeNodeUI implementations. If the option...
(optional) An object containing properties which specify custom CQ.Ext.tree.TreeNodeUI implementations. If the optional uiProvider attribute of a returned child node is a string rather than a reference to a TreeNodeUI implementation, then that string value is used as a property name in the uiProviders object.
|
TreeLoader | |
|
url : String Equivalent to dataUrl.
Equivalent to dataUrl.
|
TreeLoader | |
| Method | Defined By | |
|---|---|---|
SlingTreeLoader( Object config ) Creates a new SlingTreeLoader.
Creates a new SlingTreeLoader.
Parameters:
|
SlingTreeLoader | |
createNode( Object attr ) : void Override this function for custom TreeNode node implementation, or to
modify the attributes at creation time.
Example...
Override this function for custom TreeNode node implementation, or to modify the attributes at creation time. Example:
Parameters:
|
TreeLoader | |
enableBubble( String/Array events ) : void Enables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present....
Enables events fired by this Observable to bubble up an owner hierarchy by calling
This is commonly used by CQ.Ext.Components to bubble events to owner Containers. See CQ.Ext.Component.getBubbleTarget. The default implementation in CQ.Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to access the required target more quickly. Example:
Parameters:
|
Observable | |
getQtip( String name, Object obj ) : String Returns the qtip to be used for the tree node. The default implementation
will look for a qtipProperty in the object
Returns the qtip to be used for the tree node. The default implementation
will look for a qtipProperty in the object
Parameters:
|
SlingTreeLoader | |
getTitle( String name, Object obj ) : String Returns the title to be used for the tree node. The default implementation
will look for a titleProperty in the objec...
Returns the title to be used for the tree node. The default implementation
will look for a titleProperty in the object and fall back to
the name if no such property exists.
Parameters:
|
SlingTreeLoader | |
load( CQ.Ext.tree.TreeNode node, Function callback, Object scope ) : void Load an CQ.Ext.tree.TreeNode from the URL specified in the constructor.
This is called automatically when a node is e...
Load an CQ.Ext.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 clearOnLoad option is false.)
Parameters:
|
TreeLoader | |
readAttributes( String name, Object obj ) : Object Takes a JCR child node and creates the attributes needed for createNode.
This uses getTitle to get the title text for...
Takes a JCR child node and creates the attributes needed for createNode.
This uses getTitle to get the title text for the tree node and
getQtip to get the qtip. Override these methods directly if you only
want to change title or qtip.
Parameters:
|
SlingTreeLoader | |
relayEvents( Object o, Array events ) : void Relays selected events from the specified Observable as if the events were fired by this.
Relays selected events from the specified Observable as if the events were fired by this.
Parameters:
|
Observable | |
| Event | Defined By | |
|---|---|---|
beforeload : ( Object This, Object node, Object callback ) Fires before a network request is made to retrieve the Json text which specifies a node's children.
Fires before a network request is made to retrieve the Json text which specifies a node's children.
Listeners will be called with the following arguments:
|
TreeLoader | |
load : ( Object This, Object node, Object response ) Fires when the node has been successfuly loaded.
Fires when the node has been successfuly loaded.
Listeners will be called with the following arguments:
|
TreeLoader | |
loadexception : ( Object This, Object node, Object response ) Fires if the network request failed.
Fires if the network request failed.
Listeners will be called with the following arguments:
|
TreeLoader | |