webuijsf
Tag treeNode


Use the webuijsf:treeNode tag to insert a node in a tree structure. The webuijsf:treeNode tag can be used within a webuijsf:tree tag or another webuijsf:treeNode tag.

The webuijsf:treeNode tag is used as a child of a webuijsf:tree component or another webuijsf:treeNode component to form a tree structure. When the tree structure is rendered, the TreeNode component represents a node in the tree.

HTML Elements and Layout

The TreeNode component renders the following:

Using the webuijsf:treeNode tag

Use the text attribute to provide the content of the node in the default static text. Use the url attribute with the text attribute to make the content a hyperlink. The expanded attribute can be set to true to display a node in the expanded state on initial rendering of the tree. You can use the action attributes to perform an action when the user clicks the text hyperlink. You can use the actionListener attributes to perform an action when the user clicks the handle image hyperlink.

Facets

The TreeNode component supports the following facets:

content Specifies the text or url for the node. The content facet overrides the text and url attributes.
image Specifies the optional graphic displayed with the node. The image facet overrides the imageURL attribute.
Note that using either of these facets causes some deviation from the normal behavior. If the content or the image is supplied as an attribute of the treeNode tag clicking on the text or icon of a branch always opens that branch as well as displays appropriate content in the right pane. But when facets are used, this behavior is lost. The developer has to explicitly add this behavior to the facets.

Theme Identifiers

The following image keys might be useful for including theme images in tree nodes. To use these keys, use the image facet with a child component that supports the icon attribute, such as webuijsf:image and webuijsf:imageHyperlink.

 TREE_BLANK
 TREE_DOCUMENT
 TREE_FOLDER
 TREE_FOLDER_ALARM_MINOR
 TREE_FOLDER_ALARM_MAJOR
 TREE_FOLDER_ALARM_DOWN
 TREE_FOLDER_ALARM_CRITICAL
 TREE_SERVER
 TREE_SERVER_CRITICAL
 TREE_SERVER_DOWN
 TREE_SERVER_MAJOR
 TREE_SERVER_MINOR
 TREE_STORAGE
 TREE_STORAGE_MAJOR

Client Side Javascript Functions

The TreeNode component does not provide JavaScript functions. See the documentation for the <webuijsf:tree> tag for JavaScript functions supported by the Tree component.

Example

See the <webuijsf:tree>documentation.



Tag Information
Tag Classcom.sun.webui.jsf.component.TreeNodeTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String A ValueExpression that resolves to the UIComponent that corresponds to this tag. This attribute allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children.
toolTipfalsefalsejava.lang.String

Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.

imageURLfalsefalsejava.lang.String

Absolute or relative URL to the image to be rendered for the tree node. Note that you cannot use the imageURL to display a theme image in the tree. You should use an image facet that contains a webuijsf:image or webuijsf:imageHyperlink tag to use a theme image. The imageURL attribute is overridden by the image facet.

When the imageURL attribute is used with the url attribute, the image is hyperlinked.

actionExpressionfalsefalsejava.lang.String

The actionExpression attribute is used to specify the action to take when this component is activated by the user. The value of the action attribute must be one of the following:

  • an outcome string, used to indicate which page to display next, as defined by a navigation rule in the application configuration resource file (faces-config.xml).
  • a JavaServer Faces EL expression that resolves to a backing bean method. The method must take no parameters and return an outcome string. The class that defines the method must implement the java.io.Serializable interface or javax.faces.component.StateHolder interface.

In the Tree and TreeNode components, the action applies only when attributes are used to define the tree and tree nodes. When facets are used, the action attribute does not apply to the facets.

targetfalsefalsejava.lang.String

The resource at the specified URL is displayed in the frame that is specified with the target attribute. Values such as "_blank" that are valid for the target attribute of the <a> HTML element are also valid for this attribute in the tree components. The target attribute is useful only with the url attribute, and does not apply when a facet is used.

renderedfalsefalsejava.lang.String Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.
idfalsetruejava.lang.StringNo Description
styleClassfalsefalsejava.lang.String

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

textfalsefalsejava.lang.String

Specifies the text for this component. If the url or action attributes are also specified, the text is rendered as a hyperlink. If neither the url or action attributes are specified, the specified text is rendered as static text. The text attribute does not apply when the content facet is used.

actionListenerExpressionfalsefalsejava.lang.String

The actionListenerExpression attribute is used to specify a method to handle an action event that is triggered when a component is activated by the user. The actionListenerExpression attribute value must be a Unified EL expression that resolves to a method in a backing bean. The method must take a single parameter that is an ActionEvent, and its return type must be void. The class that defines the method must implement the java.io.Serializable interface or javax.faces.component.StateHolder interface.

In the TreeNode component, the method specified by the actionListenerExpression atttribute is invoked when the node's handle icon is clicked.

expandedfalsefalsejava.lang.String

Set the expanded attribute to true to display the tree node as expanded when the component is initially rendered. When a node is expanded, its child tree nodes are displayed. By default, nodes are collapsed initially.

stylefalsefalsejava.lang.String

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

visiblefalsefalsejava.lang.String

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

urlfalsefalsejava.lang.String

Indicates that the text that is specified with the text attribute should be rendered as a hyperlink that resolves to the specified URL. If the imageURL attribute is used with the url attribute, the image is hyperlinked. The url attribute does not apply to facets.


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.