<o:tree>
allows the developers to have full control over the markup of a tree
hierarchy by declaring the appropriate JSF components or HTML elements in the markup. The <o:tree>
does namely not render any HTML markup by itself.
The component value must point to a tree of data objects represented by a TreeModel
instance, typically
established via a ValueExpression
. During iterative processing over the nodes of tree in the tree model,
the object for the current node is exposed as a request attribute under the key specified by the var
attribute. The node itself is exposed as a request attribute under the key specified by the varNode
attribute.
The <o:tree>
tag supports only child tags of type <o:treeNode>
, representing
parent tree nodes. There can be multiple <o:treeNode>
tags, each representing a separate parent
tree node level, so that different markup could be declared for each tree node level, if necessary. The
<o:treeNode>
tag in turn supports child tag <o:treeNodeItem>
which represents
each child of the current parent tree node. The <o:treeNodeItem>
in turn supports child tag
<o:treeInsertChildren>
which represents the insertion point of the grand children.
Here is a basic usage example where each parent tree node level is treated the same way via a single
<o:treeNode>
:
<o:tree value="#{bean.treeModel}" var="item" varNode="node"> <o:treeNode> <ul> <o:treeNodeItem> <li> #{node.index} #{item.someProperty} <o:treeInsertChildren /> </li> </o:treeNodeItem> </ul> </o:treeNode> </o:tree>
Info | Value |
---|---|
Component Type | org.omnifaces.component.tree.Tree |
Handler Class | None |
Renderer Type | None |
Description | None |
Name | Required | Type | Description |
---|---|---|---|
id | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String )
| The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
rendered | false | jakarta.el.ValueExpression
(must evaluate to boolean )
| Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true. |
binding | false | jakarta.el.ValueExpression
(must evaluate to jakarta.faces.component.UIComponent )
|
The ValueExpression linking this component to a property in a backing bean.
|
value | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Object )
|
The current value of this component. As far only TreeModel is allowed as value.
|
var | false | java.lang.String | The name of the request attribute which exposes the wrapped data of the current node of the tree model. |
varNode | false | java.lang.String | The name of the request attribute which exposes the current node of the tree model. |
Output generated by Vdldoc View Declaration Language Documentation Generator.