org.apache.myfaces.custom.tree2

Class HtmlTree

Implemented Interfaces:
NamingContainer

public class HtmlTree
extends UITreeData

Represents "tree data" in an HTML format. Also provides a mechanism for maintaining expand/collapse state of the nodes in the tree.
Version:
$Revision: 227470 $ $Date: 2005-08-04 22:28:49 +0200 (Thu, 04 Aug 2005) $
Author:
Sean Schofield

Field Summary

static String
COMPONENT_TYPE

Fields inherited from class org.apache.myfaces.custom.tree2.UITreeData

COMPONENT_FAMILY, COMPONENT_TYPE

Constructor Summary

HtmlTree()
Constructor

Method Summary

UICommand
getExpandControl()
Gets the expand/collapse control that can be used to handle expand/collapse nodes.
boolean
isNodeSelected()
Indicates whether or not the current TreeNode is selected.
protected void
processChildNodes(FacesContext context, TreeNode parentNode, int processAction)
Indicates whether or not the current TreeNode is expanded.
void
restoreState(FacesContext context, Object state)
Object
saveState(FacesContext context)
void
setNodeId(String nodeId)
void
setNodeSelected(ActionEvent event)
Implements the javax.faces.event.ActionListener interface.
void
setVarNodeToggler(String varNodeToggler)

Methods inherited from class org.apache.myfaces.custom.tree2.UITreeData

broadcast, collapsePath, encodeBegin, expandAll, expandPath, getClientId, getDataModel, getFamily, getNode, getNodeId, getPathInformation, getValue, getVar, isLastChild, isNodeExpanded, processChildNodes, processDecodes, processUpdates, processValidators, queueEvent, restoreState, saveState, setNodeId, setValue, setValueBinding, setVar, toggleExpanded

Field Details

COMPONENT_TYPE

public static final String COMPONENT_TYPE

Constructor Details

HtmlTree

public HtmlTree()
Constructor

Method Details

getExpandControl

public UICommand getExpandControl()
Gets the expand/collapse control that can be used to handle expand/collapse nodes. This is only used in server-side mode. It allows the nagivation controls (if any) to be clickable as well as any commandLinks the user has set up in their JSP.
Returns:
UICommand

isNodeSelected

public boolean isNodeSelected()
Returns:
boolean

processChildNodes

protected void processChildNodes(FacesContext context,
                                 TreeNode parentNode,
                                 int processAction)
Indicates whether or not the current TreeNode is expanded.
Overrides:
processChildNodes in interface UITreeData

restoreState

public void restoreState(FacesContext context,
                         Object state)
Overrides:
restoreState in interface UITreeData

saveState

public Object saveState(FacesContext context)
Overrides:
saveState in interface UITreeData

setNodeId

public void setNodeId(String nodeId)
Overrides:
setNodeId in interface UITreeData

setNodeSelected

public void setNodeSelected(ActionEvent event)
Implements the javax.faces.event.ActionListener interface. Basically, this method is used to listen for node selection events (when a user has clicked on a leaf node.)
Parameters:
event - ActionEvent

setVarNodeToggler

public void setVarNodeToggler(String varNodeToggler)