ice
Tag tree
The tree component displays hierarchical data as a "tree" of branches and leaf nodes.
Optionally, the tree may also display navigation controls for the dynamic expansion
and collapse of branch nodes.
The tree component can be used in cases where a hierarchical data structure must be viewed
and navigated. It is typically used for menu-style applications, where the user selects
a tree node and the application responds with an action related to the selected node.
In implementing a tree tag, the application developer must provide and declare in the JSP a tree tag and
a single treeNode tag as a child of the tree tag. The tree tag should declare the "value" attribute
to be a value binding to a backing bean that will return an object that implements the
javax.swing.tree.TreeModel interface.
The TreeModel must contain a tree of DefaultMutableTreeNode instances.
Each DefaultMutableTreeNode instance encapsultes an IceUserObject. The IceUserObject is the extension point
for the application developer. If the IceUserObject does not provide sufficient state for representation
of the tree's nodes, then the application developer should extend the IceUserObject and add state as required
to their extension. When creating an IceUserObject, the DefaultMutableTreeNode wrapper must
be provided to the constructor. Then the node's state can be set to the attributes on the
IceUserObject including:
- text, a convenience field that will typically represent the text that will be displayed somewhere
in the content facet
- expanded, whether the node is expanded on its first rendering and until the
user initiates a navigation event to change this value
- tooltip, the text that will appear in the tooltip that appears when the
user hovers over a node
- leafIcon, the application-relative path to an image that will be used to
represent this node when it has no children (is a leaf),typically referred to
in the icon facet
- branchExpandedIcon, the application-relative path to an image that will be
used to represent this node when it has children (is a branch) and is expanded,
typically referred to in the icon facet
- branchContractedIcon, the application-relative path to
an image that will be used to represent this node when it has children (is a branch) and is not expanded,
typically referred to in the icon facet.
The "binding" attribute can be defined so that the
application developer will have access to the Tree component in the application's backing bean.
The "var" attribute can be declared on the tree tag such that the treeNode tag's children have
access to the state of the TreeModel's node that it represents.
See the documentation for the treeNode tag for a description of supported facets.
| Tag Information |
| Tag Class | com.icesoft.faces.component.tree.TreeTag |
| TagExtraInfo Class | None |
| Body Content | JSP |
| Display Name | None |
| Attributes |
| Name | Required | Request-time | Type | Description |
| id | false | false | java.lang.String | Every component must have an unique id. Automatically created if omitted. |
| binding | false | false | java.lang.String | Component binding. |
| value | false | false | java.lang.String |
Sets the component's model value, which must be a JSF value
binding expression for a "com.icesoft.faces.component.custom.treeView.TreeModel" instance.
|
| var | false | false | java.lang.String |
Name of a request-scope attribute under which the model data for the
row selected by the current value of the "rowIndex" property (i.e.
also the current value of the "rowData" property) will be exposed.
|
| hideRootNode | false | false | java.lang.String | Declares whether the root tree node will be rendered.
Valid values are true and false. |
| hideNavigation | false | false | java.lang.String | Declares whether the navigation links will be rendered.
Valid values are true and false. |
| imageDir | false | false | java.lang.String | Set directory for location of the tree images. |
| styleClass | false | false | java.lang.String |
CSS class to be applied to the top most html element of the rendered component.
|
| style | false | false | java.lang.String |
CSS style(s) to be applied to the top most html element of the rendered component.
|
| action | false | false | java.lang.String |
MethodBinding representing the application action to invoke when
this component is activated by the user. The expression must
evaluate to a public method that takes no parameters, and returns
a String (the logical outcome) which is passed to the
NavigationHandler for this application.
|
| actionListener | false | false | java.lang.String |
MethodBinding representing an action listener method that will be
notified when this component is activated by the user. The
expression must evaluate to a public method that takes an
ActionEvent parameter, with a return type of void.
|
| immediate | false | false | java.lang.String | Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase. |
| rendered | false | false | java.lang.String | If false, this component will not be rendered. |
| navOpenTop | false | false | java.lang.String |
Name of the image that overrides the default image.
|
| navOpenTopNoSiblings | false | false | java.lang.String |
Name of the image that overrides the default image.
|
| navCloseTop | false | false | java.lang.String | No Description |
| folderImage | false | false | java.lang.String |
Name of the image that overrides the default image.
|
| folderOpenImage | false | false | java.lang.String | No Description |
| documentImage | false | false | java.lang.String | No Description |
| Variables |
No Variables Defined. |
Output Generated by
Tag Library Documentation Generator.
Java, JSP, and JavaServer Pages are trademarks or
registered trademarks of Sun Microsystems, Inc. in the US and other
countries. Copyright 2002-4 Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054, U.S.A.
All Rights Reserved.