com.mycompany.jsf.model
Class TreeModel

java.lang.Object
  extended bycom.mycompany.jsf.model.TreeModel

public class TreeModel
extends java.lang.Object

This class represents a tree of nodes, used as the model for the UITree component.

Version:
1.0
Author:
Hans Bergsten, Gefion Software

Field Summary
private  TreeNode currentNode
           
private  TreeNode root
           
private static java.lang.String SEPARATOR
           
 
Constructor Summary
TreeModel(TreeNode root)
          Create a model with the provided TreeNode as the root.
 
Method Summary
 TreeNode getNode()
          Returns the current node, or null if no node is selected.
 void setNodeId(java.lang.String nodeId)
          Selects the node matching the specified node ID, or deselects the current node if the node ID is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

private static final java.lang.String SEPARATOR

root

private TreeNode root

currentNode

private TreeNode currentNode
Constructor Detail

TreeModel

public TreeModel(TreeNode root)
Create a model with the provided TreeNode as the root.

Method Detail

getNode

public TreeNode getNode()
Returns the current node, or null if no node is selected.


setNodeId

public void setNodeId(java.lang.String nodeId)
Selects the node matching the specified node ID, or deselects the current node if the node ID is null. The node ID is a colon-separated list of zero-based node indexes, e.g., the node ID "0:0:1" represents the second subnode of the first node under the root node.