org.apache.myfaces.custom.tree2

Class HtmlTree

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 StringCOMPONENT_TYPE
Constructor Summary
HtmlTree()
Constructor
Method Summary
UICommandgetExpandControl()
Gets the expand/collapse control that can be used to handle expand/collapse nodes.
booleanisNodeSelected()
Indicates whether or not the current TreeNode is selected.
protected voidprocessChildNodes(FacesContext context, TreeNode parentNode, int processAction)
Indicates whether or not the current TreeNode is expanded.
voidrestoreState(FacesContext context, Object state)
ObjectsaveState(FacesContext context)
voidsetNodeId(String nodeId)
voidsetNodeSelected(ActionEvent event)
Implements the javax.faces.event.ActionListener interface.
voidsetVarNodeToggler(String varNodeToggler)

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE

Constructor Detail

HtmlTree

public HtmlTree()
Constructor

Method Detail

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()
Indicates whether or not the current TreeNode is selected.

Returns: boolean

processChildNodes

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

Returns: boolean

restoreState

public void restoreState(FacesContext context, Object state)

saveState

public Object saveState(FacesContext context)

setNodeId

public void setNodeId(String nodeId)

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)