| |||||||
FRAMES NO FRAMES |
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.
The TreeNode component renders the following:
A row of the tree lines that connect to other tree nodes.
Small graphic images of "handles" that are used to open and close branches of the tree. The TreeNode component calls the imageHyperlink component, which displays clickable handle icons that are used to expand and collapse the node. The handle icons are rendered only if the TreeNode contains other TreeNodes.
Optional graphic images that pertain to the content of the tree
node, such as a folder image. The TreeNode component calls the
imageHyperlink component to render the image. Images are rendered if you
specify the image
attribute or use the image
facet.
Text or a hyperlink for the content of the TreeNode. The default display of
the content is rendered when you specify the text
and url
attributes. You can use the content
facet to specify a component to
render custom content for the node.
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.
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. |
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
The TreeNode component does not provide JavaScript functions.
See the documentation for the <webuijsf:tree>
tag for
JavaScript functions supported by the Tree component.
See the <webuijsf:tree>
documentation.
Tag Information | |
Tag Class | com.sun.webui.jsf.component.TreeNodeTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
binding | false | false | java.lang.String | A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children. |
toolTip | false | false | java.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. |
imageURL | false | false | java.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 When the imageURL attribute is used with the url attribute, the image is hyperlinked. |
actionExpression | false | false | java.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:
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. |
target | false | false | java.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. |
rendered | false | false | java.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. |
id | false | true | java.lang.String | No Description |
styleClass | false | false | java.lang.String | CSS style class(es) to be applied to the outermost HTML element when this component is rendered. |
text | false | false | java.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. |
actionListenerExpression | false | false | java.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 In the TreeNode component, the method specified by the actionListenerExpression atttribute is invoked when the node's handle icon is clicked. |
expanded | false | false | java.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. |
style | false | false | java.lang.String | CSS style(s) to be applied to the outermost HTML element when this component is rendered. |
visible | false | false | java.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. |
url | false | false | java.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. |
| |||||||
FRAMES NO FRAMES |