ICEfaces Component Suite
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. Tree navigation events are available so that an application can respond to these events. Nodes may also support an action event that can be used to respond to user click events.
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 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 Classcom.icesoft.faces.component.tree.TreeTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
actionfalsefalsejava.lang.String MethodBinding representing the application action to invoke when this component is activated by the user. The expression must evaluate to a either a String or a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.
actionListenerfalsefalsejava.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.
bindingfalsefalsejava.lang.String The value binding expression linking this component to a property in a backing bean
documentImagefalsefalsejava.lang.String
folderImagefalsefalsejava.lang.String
folderOpenImagefalsefalsejava.lang.String
hideNavigationfalsefalsejava.lang.String Declares whether the navigation links will be rendered. Valid values are true and false.
hideRootNodefalsefalsejava.lang.String Declares whether the root tree node will be rendered. Valid values are true and false.
idfalsefalsejava.lang.String The component identifier for this component. This value must be unique within the closest parent component that is a naming container.
imageDirfalsefalsejava.lang.String Set directory for location of the tree images.
immediatefalsefalsejava.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.
keyboardNavigationEnabledfalsefalsejava.lang.String Enables keyboard support, default value is true.
navCloseTopfalsefalsejava.lang.StringNo Description
navOpenTopfalsefalsejava.lang.String Name of the image that overrides the default image.
navOpenTopNoSiblingsfalsefalsejava.lang.String Name of the image that overrides the default image.
renderedfalsefalsejava.lang.String Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
stylefalsefalsejava.lang.String CSS style(s) to be applied when this component is rendered.
styleClassfalsefalsejava.lang.String

Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.

Defines the base class name for all style classes. Default value is iceTree

  • iceTree
  • iceTreeRow
valuefalsefalsejava.lang.String Sets the component's model value, which must be a JSF value binding expression to an implementation of the "javax.swing.tree.TreeModel" interface.
varfalsefalsejava.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.

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.