Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > UI Tag Reference > tree

To use this tag:

  • Add: <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> to your page.
  • The head tag must be included on the page, which can be configured for performance or debugging purposes.
  • If the parseContent parameter for the head tag is false (it is false by default), then the id tag is required.

Additional Examples

For more examples see Ajax and JavaScript Recipes

Description

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Parameters

Dynamic Attributes Allowed:

false
 

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
blankIconSrcfalsefalseStringBlank icon image source.
childCollectionPropertyfalsefalseStringThe childCollectionProperty property.
collapsedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is collapsed. An object with a 'node' property will be passed as parameter to the topics.
cssClassfalsefalseStringThe css class to use for element
cssErrorClassfalsefalseStringThe css error class to use for element
cssErrorStylefalsefalseStringThe css error style definitions for element to use
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails).Only valid if 'href' is set
errorPositionfalsefalseStringDefine error position of form element (top|bottom)
expandIconSrcMinusfalsefalseStringExpand icon image source.
expandIconSrcPlusfalsefalseStringExpand Icon image source.
expandedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is expanded. An object with a 'node' property will be passed as parameter to the topics.
gridIconSrcCfalsefalseStringImage source for under child item child icons.
gridIconSrcLfalsefalseString Image source for last child grid.
gridIconSrcPfalsefalseStringImage source for under parent item child icons.
gridIconSrcVfalsefalseStringImage source for vertical line.
gridIconSrcXfalsefalseStringImage source for grid for sole root item.
gridIconSrcYfalsefalseStringImage source for grid for last root item.
hreffalsefalseStringUrl used to load the list of children nodes for an specific node, whose id will be passed as a parameter named 'nodeId' (empty for root)
iconHeightfalse18pxfalseStringIcon height
iconWidthfalse19pxfalseStringIcon width
idfalsefalseStringThe id to use for the element
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering an element specific label
labelSeparatorfalse:falseStringString that will be appended to the label
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
nodeIdPropertyfalsefalseStringThe nodeIdProperty property.
nodeTitlePropertyfalsefalseStringThe nodeTitleProperty property.
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredLabelfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredPositionfalsefalseStringDefine required position of required form element (left|right)
rootNodefalsefalseStringThe rootNode property.
selectedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is selected. An object with a 'node' property will be passed as parameter to the topics.
showGridfalsetruefalseBooleanShow grid
showRootGridfalsefalseStringThe showRootGrid property (default true).
stylefalsefalseStringThe css style definitions for element to use - it's an alias of cssStyle attribute.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalse{contextPath}/struts/tree.css.falseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
togglefalsefadefalseStringThe toggle property (either 'explode' or 'fade')
toggleDurationfalse150falseStringToggle duration in milliseconds
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
treeCollapsedTopicsfalsefalseStringDeprecated. Use 'collapsedNotifyTopics' instead.
treeExpandedTopicsfalsefalseStringDeprecated. Use 'expandedNotifyTopics' instead.
treeSelectedTopicfalsefalseStringDeprecated. Use 'selectedNotifyTopics' instead.
valuefalsefalseStringPreset the value of input element.

Examples

Static tree:

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Dynamic tree (rendered on the server):

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20

Dynamic tree loaded with AJAX (one request is made for each node):

Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20