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.components
Class Tree

    java.lang.Object
      org.apache.struts2.components.Component
          org.apache.struts2.components.UIBean
              org.apache.struts2.components.ClosingUIBean
                  org.apache.struts2.components.Tree

    public class Tree

extends ClosingUIBean

Renders a tree widget with AJAX support.

The id attribute is normally specified, such that it could be looked up using javascript if necessary.

Examples

     <-- statically -->
     <s:tree id="..." label="...">
        <s:treenode id="..." label="..." />
        <s:treenode id="..." label="...">
            <s:treenode id="..." label="..." />
            <s:treenode id="..." label="..." />
        &;lt;/s:treenode>
        <s:treenode id="..." label="..." />
     </s:tree>

     <-- dynamically -->
     <s:tree
              id="..."
              rootNode="..."
              nodeIdProperty="..."
              nodeTitleProperty="..."
              childCollectionProperty="..." />

Field Summary
`private String` | `blankIconSrc`
`protected String` | `childCollectionProperty`
`private String` | `expandIconSrcMinus`
`private String` | `expandIconSrcPlus`
`private String` | `gridIconSrcC`
`private String` | `gridIconSrcL`
`private String` | `gridIconSrcP`
`private String` | `gridIconSrcV`
`private String` | `gridIconSrcX`
`private String` | `gridIconSrcY`
`private String` | `iconHeight`
`private String` | `iconWidth`
`protected String` | `nodeIdProperty`
`protected String` | `nodeTitleProperty`
`private static String` | `OPEN_TEMPLATE`
`protected String` | `rootNodeAttr`
`private String` | `showGrid`
`private String` | `showRootGrid`
`private static String` | `TEMPLATE`
`private String` | `templateCssPath`
`private String` | `toggle`
`private String` | `toggleDuration`
`private String` | `treeCollapsedTopic`
`private String` | `treeExpandedTopic`
`private String` | `treeSelectedTopic`

Fields inherited from class org.apache.struts2.components.ClosingUIBean
`openTemplate`

Fields inherited from class org.apache.struts2.components.UIBean
`accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme, disabled, key, label, labelPosition, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, required, requiredposition, response, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, value`

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

Constructor Summary
`Tree(ValueStack stack, HttpServletRequest request, HttpServletResponse response)`

Method Summary
`protected void` | `evaluateExtraParams()`
`String` | `getBlankIconSrc()`
`String` | `getChildCollectionProperty()`
`String` | `getDefaultOpenTemplate()`
`protected String` | `getDefaultTemplate()` A contract that requires each concrete UI Tag to specify which template should be used as a default.
`String` | `getExpandIconSrcMinus()`
`String` | `getExpandIconSrcPlus()`
`String` | `getGridIconSrcC()`
`String` | `getGridIconSrcL()`
`String` | `getGridIconSrcP()`
`String` | `getGridIconSrcV()`
`String` | `getGridIconSrcX()`
`String` | `getGridIconSrcY()`
`String` | `getIconHeight()`
`String` | `getIconWidth()`
`String` | `getNodeIdProperty()`
`String` | `getNodeTitleProperty()`
`String` | `getRootNode()`
`String` | `getShowGrid()`
`String` | `getShowRootGrid()`
`String` | `getTemplateCssPath()`
`String` | `getToggle()`
`String` | `getToggleDuration()`
`String` | `getTreeCollapsedTopic()`
`String` | `getTreeExpandedTopic()`
`String` | `getTreeSelectedTopic()`
`void` | `setBlankIconSrc(String blankIconSrc)`
`void` | `setChildCollectionProperty(String childCollectionProperty)`
`void` | `setExpandIconSrcMinus(String expandIconSrcMinus)`
`void` | `setExpandIconSrcPlus(String expandIconSrcPlus)`
`void` | `setGridIconSrcC(String gridIconSrcC)`
`void` | `setGridIconSrcL(String gridIconSrcL)`
`void` | `setGridIconSrcP(String gridIconSrcP)`
`void` | `setGridIconSrcV(String gridIconSrcV)`
`void` | `setGridIconSrcX(String gridIconSrcX)`
`void` | `setGridIconSrcY(String gridIconSrcY)`
`void` | `setIconHeight(String iconHeight)`
`void` | `setIconWidth(String iconWidth)`
`void` | `setNodeIdProperty(String nodeIdProperty)`
`void` | `setNodeTitleProperty(String nodeTitleProperty)`
`void` | `setRootNode(String rootNode)`
`void` | `setShowGrid(String showGrid)`
`void` | `setShowRootGrid(String showRootGrid)`
`void` | `setTemplateCssPath(String templateCssPath)`
`void` | `setToggle(String toggle)`
`void` | `setToggleDuration(String toggleDuration)`
`void` | `setTreeCollapsedTopic(String treeCollapsedTopic)`
`void` | `setTreeExpandedTopic(String treeExpandedTopic)`
`void` | `setTreeSelectedTopic(String treeSelectedTopic)`
`boolean` | `start(Writer writer)` Callback for the start tag of this component.

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

Methods inherited from class org.apache.struts2.components.UIBean
`addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, escape, evaluateNameValue, evaluateParams, getTemplate, getTemplateDir, getTheme, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey, setLabel, setLabelposition, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequired, setRequiredposition, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setValue`

Methods inherited from class org.apache.struts2.components.Component
`addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setActionMapper, setId, toString, usesBody`

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

Field Detail

### TEMPLATE

    private static final String TEMPLATE

See Also:
  Constant Field Values

### OPEN_TEMPLATE

    private static final String OPEN_TEMPLATE

See Also:
  Constant Field Values

### toggle

    private String toggle

### treeSelectedTopic

    private String treeSelectedTopic

### treeExpandedTopic

    private String treeExpandedTopic

### treeCollapsedTopic

    private String treeCollapsedTopic

### rootNodeAttr

    protected String rootNodeAttr

### childCollectionProperty

    protected String childCollectionProperty

### nodeTitleProperty

    protected String nodeTitleProperty

### nodeIdProperty

    protected String nodeIdProperty

### showRootGrid

    private String showRootGrid

### showGrid

    private String showGrid

### blankIconSrc

    private String blankIconSrc

### gridIconSrcL

    private String gridIconSrcL

### gridIconSrcV

    private String gridIconSrcV

### gridIconSrcP

    private String gridIconSrcP

### gridIconSrcC

    private String gridIconSrcC

### gridIconSrcX

    private String gridIconSrcX

### gridIconSrcY

    private String gridIconSrcY

### expandIconSrcPlus

    private String expandIconSrcPlus

### expandIconSrcMinus

    private String expandIconSrcMinus

### iconWidth

    private String iconWidth

### iconHeight

    private String iconHeight

### toggleDuration

    private String toggleDuration

### templateCssPath

    private String templateCssPath

Constructor Detail

### Tree

    public Tree(ValueStack stack,
                HttpServletRequest request,
                HttpServletResponse response)

Method Detail

### start

    public boolean start(Writer writer)

  Description copied from class: `Component`
  Callback for the start tag of this component. Should the body be evaluated?

  Overrides:
    `start` in class `ClosingUIBean`
  Parameters:
    `writer` - the output writer.
  Returns:
    true if the body should be evaluated

### evaluateExtraParams

    protected void evaluateExtraParams()

  Overrides:
    `evaluateExtraParams` in class `UIBean`

### getDefaultOpenTemplate

    public String getDefaultOpenTemplate()

  Specified by:
    `getDefaultOpenTemplate` in class `ClosingUIBean`

### getDefaultTemplate

    protected String getDefaultTemplate()

  Description copied from class: `UIBean`
  A contract that requires each concrete UI Tag to specify which template should be used as a default. For example, the CheckboxTab might return "checkbox.vm" while the RadioTag might return "radio.vm". This value not begin with a '/' unless you intend to make the path absolute rather than relative to the current theme.

  Specified by:
    `getDefaultTemplate` in class `UIBean`
  Returns:
    The name of the template to be used as the default.

### getToggle

    public String getToggle()

### setToggle

    public void setToggle(String toggle)

### getTreeSelectedTopic

    public String getTreeSelectedTopic()

### setTreeSelectedTopic

    public void setTreeSelectedTopic(String treeSelectedTopic)

### getTreeExpandedTopic

    public String getTreeExpandedTopic()

### setTreeExpandedTopic

    public void setTreeExpandedTopic(String treeExpandedTopic)

### getTreeCollapsedTopic

    public String getTreeCollapsedTopic()

### setTreeCollapsedTopic

    public void setTreeCollapsedTopic(String treeCollapsedTopic)

### getRootNode

    public String getRootNode()

### setRootNode

    public void setRootNode(String rootNode)

### getChildCollectionProperty

    public String getChildCollectionProperty()

### setChildCollectionProperty

    public void setChildCollectionProperty(String childCollectionProperty)

### getNodeTitleProperty

    public String getNodeTitleProperty()

### setNodeTitleProperty

    public void setNodeTitleProperty(String nodeTitleProperty)

### getNodeIdProperty

    public String getNodeIdProperty()

### setNodeIdProperty

    public void setNodeIdProperty(String nodeIdProperty)

### setShowRootGrid

    public void setShowRootGrid(String showRootGrid)

### getShowRootGrid

    public String getShowRootGrid()

### getBlankIconSrc

    public String getBlankIconSrc()

### setBlankIconSrc

    public void setBlankIconSrc(String blankIconSrc)

### getExpandIconSrcMinus

    public String getExpandIconSrcMinus()

### setExpandIconSrcMinus

    public void setExpandIconSrcMinus(String expandIconSrcMinus)

### getExpandIconSrcPlus

    public String getExpandIconSrcPlus()

### setExpandIconSrcPlus

    public void setExpandIconSrcPlus(String expandIconSrcPlus)

### getGridIconSrcC

    public String getGridIconSrcC()

### setGridIconSrcC

    public void setGridIconSrcC(String gridIconSrcC)

### getGridIconSrcL

    public String getGridIconSrcL()

### setGridIconSrcL

    public void setGridIconSrcL(String gridIconSrcL)

### getGridIconSrcP

    public String getGridIconSrcP()

### setGridIconSrcP

    public void setGridIconSrcP(String gridIconSrcP)

### getGridIconSrcV

    public String getGridIconSrcV()

### setGridIconSrcV

    public void setGridIconSrcV(String gridIconSrcV)

### getGridIconSrcX

    public String getGridIconSrcX()

### setGridIconSrcX

    public void setGridIconSrcX(String gridIconSrcX)

### getGridIconSrcY

    public String getGridIconSrcY()

### setGridIconSrcY

    public void setGridIconSrcY(String gridIconSrcY)

### getIconHeight

    public String getIconHeight()

### setIconHeight

    public void setIconHeight(String iconHeight)

### getIconWidth

    public String getIconWidth()

### setIconWidth

    public void setIconWidth(String iconWidth)

### getTemplateCssPath

    public String getTemplateCssPath()

### setTemplateCssPath

    public void setTemplateCssPath(String templateCssPath)

### getToggleDuration

    public String getToggleDuration()

### setToggleDuration

    public void setToggleDuration(String toggleDuration)

### getShowGrid

    public String getShowGrid()

### setShowGrid

    public void setShowGrid(String showGrid)

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-2007 Apache Software Foundation. All Rights Reserved.