Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.dojo.components
Class TreeNode

    java.lang.Object
      org.apache.struts2.components.Component
          org.apache.struts2.components.UIBean
              org.apache.struts2.components.ClosingUIBean
                  org.apache.struts2.dojo.components.TreeNode

    public class TreeNode

extends ClosingUIBean

Renders a tree node within a tree widget with AJAX support.

Either of the following combinations should be used depending on if the tree is to be constructed dynamically or statically.

Dynamically:

- id - id of this tree node
- title - label to be displayed for this tree node

Statically:

- rootNode - the parent node of which this tree is derived from
- nodeIdProperty - property to obtained this current tree node's id
- nodeTitleProperty - property to obtained this current tree node's title
- childCollectionProperty - property that returnds this current tree node's children

Examples

     <-- Creating tree statically using hard-coded data. -->
     <s:tree id="..." label="...">
        <s:treenode id="..." label="..." />
        <s:treenode id="..." label="...">
            <s:treenode id="..." label="..." />
            <s:treenode id="..." label="..." />
        </s:treenode>
        <s:treenode id="..." label="..." />
     </s:tree>

     <-- Creating tree dynamically using data from backing action. -->
     <s:tree
              id="..."
              rootNode="..."
              nodeIdProperty="..."
              nodeTitleProperty="..."
              childCollectionProperty="..." />

Field Summary

Fields inherited from class org.apache.struts2.components.UIBean
`accesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, disabled, dynamicAttributes, errorPosition, id, javascriptTooltip, key, label, labelPosition, labelSeparator, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, requiredLabel, requiredPosition, response, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, uiThemeExpansionToken, value`

Fields inherited from class org.apache.struts2.components.Component
`actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure`

Constructor Summary
`TreeNode(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`

Method Summary
`protected void` | `evaluateExtraParams()`
`String` | `getDefaultOpenTemplate()`
`protected String` | `getDefaultTemplate()`
`String` | `getTheme()`
`void` | `setCssClass(String cssClass)`
`void` | `setCssStyle(String cssStyle)`
`void` | `setId(String id)`
`void` | `setLabel(String label)`
`void` | `setName(String name)`
`void` | `setTheme(String theme)`

Methods inherited from class org.apache.struts2.components.ClosingUIBean
`setOpenTemplate, start`

Methods inherited from class org.apache.struts2.components.UIBean
`addFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, evaluateParams, getId, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setClass, setCssErrorClass, setCssErrorStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setJavascriptTooltip, setKey, setLabelposition, setLabelSeparator, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setStyle, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValue`

Methods inherited from class org.apache.struts2.components.Component
`addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBody`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TreeNode

    public TreeNode(com.opensymphony.xwork2.util.ValueStack stack,
                    javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)

Method Detail

### setTheme

    public void setTheme(String theme)

  Overrides:
    `setTheme` in class `UIBean`

### getTheme

    public String getTheme()

  Overrides:
    `getTheme` in class `UIBean`

### getDefaultOpenTemplate

    public String getDefaultOpenTemplate()

  Specified by:
    `getDefaultOpenTemplate` in class `ClosingUIBean`

### getDefaultTemplate

    protected String getDefaultTemplate()

  Specified by:
    `getDefaultTemplate` in class `UIBean`

### evaluateExtraParams

    protected void evaluateExtraParams()

  Overrides:
    `evaluateExtraParams` in class `UIBean`

### setLabel

    public void setLabel(String label)

  Overrides:
    `setLabel` in class `UIBean`

### setCssClass

    public void setCssClass(String cssClass)

  Overrides:
    `setCssClass` in class `UIBean`

### setCssStyle

    public void setCssStyle(String cssStyle)

  Overrides:
    `setCssStyle` in class `UIBean`

### setId

    public void setId(String id)

  Overrides:
    `setId` in class `UIBean`

### setName

    public void setName(String name)

  Overrides:
    `setName` in class `UIBean`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2017 Apache Software Foundation. All rights reserved.