A tree populated with content from a com.webmethods.caf.faces.data.tree.ITreeContentProvider
object. An ITreeContentProvider
presents a flattened view of the tree, iterating over the tree structure in depth-first order. The Async Tree control differs from the standard Tree control in that the Async Tree control initially displays only a small portion of the tree and uses asynchronous requests to display other portions as a user expands nodes on the client.
LazyNodeTreeContentProvider
For large trees, use the LazyNodeTreeContentProvider
, which is designed to access a tree's nodes only as needed, making it suitable for use with a data source that would normally require many queries to construct the full tree.
To use the LazyNodeTreeContentProvider
, you must:
com.webmethods.caf.faces.data.tree.INode
objects.getChildren()
method to confirm whether the node has children or not. If the node has children, a "+" icon is added to the node in the user interface. Lazy loading is still applied, as the method does not work recursively down the tree.If the node has children, they are loaded when the user expands the node in the user interface. As a result, only a relatively small number of the tree nodes must load their children in a large data tree.
You can initialize the LazyNodeTreeContentProvider
with a list of root nodes or with a single root node. You can configure the initial state of the LazyNodeTreeContentProvider
to a certain depth by using its setOpenToDepth()
method, where 0 indicates completely closed, 1 indicates show children, 2 indicates show children and grandchildren. For example:
INode root = new MyNodeImpl("my root info");
ITreeContentProvider tree = new LazyNodeTreeContentProvider(root);
tree.setOpenToDepth(1);
Columns and Rows
Just like the Table control, columns can be added to the Tree control to display content for each tree row. Table columns (including special columns, like Select Row columns) work in Trees exactly the same as they do in Tables. Additionally, special tree-specific Tree Toggle column controls enable users to expand and collapse tree rows. It is recommended that each tree include a Tree Toggle control.
You can sort columns by specifying a key in the column's sort property value. For more information, see the Standard Column control.
Asynchronous Properties
Use the Async Tree control's initialDepth
, progressDelay
, progressFlashOnComplete
, progressMsg
, refillDepth
, refreshOnShow
, and suppressInputs
attributes to customize the tree's asynchronous behavior.
initialDepth
property to set the number of tree nodes loaded the first time on the client.
When specifying the initialDepth
attribute, use 0 to indicate roots only; 1 to indicate roots and children; 2 to indicate roots, children and grandchildren, etc.
refillDepth
property to determine how many levels of nodes are loaded when the user tries to expand a node, and the node's children are not available on the client.
When specifying the refillDepth
attribute, use 0 to indicate children only; 1 to indicate children and grandchildren; 2 to indicate children, grandchildren, and great grandchildren, etc.
Children
javax.faces.Column
, Basic Column control
Info | Value |
---|---|
Component Type | com.webmethods.caf.faces.tree.AsyncTree |
Handler Class | com.webmethods.caf.faces.component.DynamicControlHandler |
Renderer Type | com.webmethods.caf.faces.tree.AsyncTree |
Description | Displays data model as a tree that loads nodes asynchronously |
Palette Location | CAF Html/Control/Table/Async Tree |
Client-Side Model | CAF.Tree.Model |
Name | Description |
---|---|
caption | Table caption |
header | Table header |
footer | Table footer |
empty | Empty message content |
Name | Required | Type | Description |
---|---|---|---|
bgcolor | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The background color for all table cells |
border | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Specifies the size of the border around the table. If the value is 0 or absent, no border is rendered |
cellpadding | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Specifies the spacing between data in a table cell and the border of the cell. |
cellspacing | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Specifies the spacing between table cells. |
columnClasses | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| A comma separated list of CSS classes for the table body <td> elements. |
customRowClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Binding expression that specifies a custom CSS class name to add to the current row |
dir | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Specifies the directionality of the flow of the content for the current element
Valid values are:
|
filter | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Filter expression |
footerClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class for footer cells |
frame | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Specifies the sides of the outer table border for which to draw borders.
Valid values are:
|
headerClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| The CSS class for header cells |
id | false | java.lang.String | Control identifier |
initialDepth | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
|
Depth to load initially on the client (0=roots only)
If not specified, the default value is "0". |
lang | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Specifies the language of the enclosed content |
maxOrdinal | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Maximum number of sort ordinals allowed (1=primary only, 2=primary and secondary only, etc.) |
onclick | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onclick" event handler |
ondblclick | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "ondblclick" event handler |
onkeydown | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onkeydown" event handler |
onkeypress | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onkeypress" event handler |
onkeyup | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onkeyup" event handler |
onmousedown | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onmousedown" event handler |
onmousemove | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onmousemove" event handler |
onmouseout | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onmouseout" event handler |
onmouseover | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onmouseover" event handler |
onmouseup | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| JavaScript "onmouseup" event handler |
progressDelay | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
|
Milliseconds to wait before showing progress dialog
If not specified, the default value is "0". |
progressFlashOnComplete | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True if panel should flash when asynchronous loading has completed
If not specified, the default value is "true". |
progressMsg | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Progress dialog message; defaults to a localized message, in English "Loading..." |
refillDepth | false | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
|
Depth to load when filling-in node children asynchronously (0=children only)
If not specified, the default value is "0". |
refreshOnShow | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True to refresh content every time panel is toggled visible. Ignored if Lazy Load is false.
If not specified, the default value is "false". |
rendered | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True to render control; false to ignore it
If not specified, the default value is "true". |
rowClasses | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| A comma separated list of CSS classes for the table rows. The classes are used for the <tr> elements in the order they are listed, repeating the list over all rows in the table. |
rowHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Row height in pixels (ex '20px') or ems (ex '2em') |
rules | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Specifies the interior dividing line display in a table.
Valid values are:
|
selectedRowClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS class name for selected rows |
style | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| HTML "style" attribute value |
styleClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
HTML "class" attribute value
Valid values are:
|
summary | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Aids accessibility for non-visual browsers by providing a summary of the table's purpose and structure |
suppressInputs | false | javax.el.ValueExpression
(must evaluate to java.util.Collection )
|
WARNING: This property has been deprecated. Ids of controls on which to disallow update processing while handling asynchronous requestsIf not specified, the default value is "false". |
title | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| HTML "title" attribute value (often displayed as a tooltip) |
value | true | java.lang.String | Data model |
var | true | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of variable reference to the current row object |
width | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Specifies the table width in pixels or a percentage of the available width |
Output generated by Vdldoc View Declaration Language Documentation Generator.