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:

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
idfalsefalsejava.lang.StringEvery component must have an unique id. Automatically created if omitted.
bindingfalsefalsejava.lang.StringComponent binding.
valuefalsefalsejava.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.
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.
hideRootNodefalsefalsejava.lang.StringDeclares whether the root tree node will be rendered. Valid values are true and false.
hideNavigationfalsefalsejava.lang.StringDeclares whether the navigation links will be rendered. Valid values are true and false.
imageDirfalsefalsejava.lang.StringSet directory for location of the tree images.
styleClassfalsefalsejava.lang.String CSS class to be applied to the top most html element of the rendered component.
stylefalsefalsejava.lang.String CSS style(s) to be applied to the top most html element of the rendered component.
actionfalsefalsejava.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.
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.
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.
renderedfalsefalsejava.lang.StringIf false, this component will not be rendered.
navOpenTopfalsefalsejava.lang.String Name of the image that overrides the default image.
navOpenTopNoSiblingsfalsefalsejava.lang.String Name of the image that overrides the default image.
navCloseTopfalsefalsejava.lang.StringNo Description
folderImagefalsefalsejava.lang.String Name of the image that overrides the default image.
folderOpenImagefalsefalsejava.lang.StringNo Description
documentImagefalsefalsejava.lang.StringNo 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.