org.apache.struts2.components
Class TreeNode

java.lang.Object
  extended by org.apache.struts2.components.Component
      extended by org.apache.struts2.components.UIBean
          extended by org.apache.struts2.components.ClosingUIBean
              extended by org.apache.struts2.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 constrcted dynamically or statically.

Dynamically

Statically

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
 
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, disabled, label, labelPosition, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, required, requiredposition, response, tabindex, template, templateDir, templateSuffix, theme, title, tooltip, tooltipConfig, value
 
Fields inherited from class org.apache.struts2.components.Component
COMPONENT_STACK, id, parameters, stack
 
Constructor Summary
TreeNode(com.opensymphony.xwork2.util.OgnlValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 java.lang.String getDefaultOpenTemplate()
           
protected  java.lang.String getDefaultTemplate()
          A contract that requires each concrete UI Tag to specify which template should be used as a default.
 void setLabel(java.lang.String label)
          Label expression used for rendering tree node label.
 
Methods inherited from class org.apache.struts2.components.ClosingUIBean
setOpenTemplate, start
 
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, escape, evaluateExtraParams, evaluateNameValue, evaluateParams, getTemplate, getTemplateDir, getTheme, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle, setDisabled, setLabelposition, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequired, setRequiredposition, setTabindex, setTemplate, setTemplateDir, 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, setId, 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.OgnlValueStack stack,
                javax.servlet.http.HttpServletRequest request,
                javax.servlet.http.HttpServletResponse response)
Method Detail

getDefaultOpenTemplate

public java.lang.String getDefaultOpenTemplate()
Specified by:
getDefaultOpenTemplate in class ClosingUIBean

getDefaultTemplate

protected java.lang.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.

setLabel

public void setLabel(java.lang.String label)
Label expression used for rendering tree node label.

Overrides:
setLabel in class UIBean


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.