tutorial.jsf.component.ajaxtree.model
Class AjaxTreeNode

java.lang.Object
  extended by tutorial.jsf.component.ajaxtree.model.AjaxTreeNode

public class AjaxTreeNode
extends java.lang.Object

Created: Feb 2, 2008
Title: TreeNode
Description:
Copyright: Copyright (c) 2008
Company: Asparity Decision Solutions

Author:
MTyson

A class that models a node in the ajax tree.

Note that the NodeString is the unique identifier for a given node on the client side. It doesn't have to be unique within a given tree, but it must identify the node uniquely to the server. Specifically, the AjaxTreeDataProvider must be able to take a NodeString and create an AjaxTreeNode (populated with its label, type and hasChild status).
If the wrapped object is not required, the tree api doesn't need it to be set on the node. That is, you can use the 4 param constructor, as long as you don't then try to access the wrapped object in your code (ie, #{node.wrapped})


Constructor Summary
AjaxTreeNode()
          default empty constructor
AjaxTreeNode(java.lang.String nodeString, boolean leaf)
           
AjaxTreeNode(java.lang.String nodeString, boolean leaf, java.lang.Object label)
           
AjaxTreeNode(java.lang.String nodeString, boolean leaf, java.lang.Object label, java.lang.Object type)
           
AjaxTreeNode(java.lang.String nodeString, boolean leaf, java.lang.Object label, java.lang.Object type, java.lang.Object wrapped)
           
 
Method Summary
 java.lang.Object getLabel()
           
 java.lang.String getNodeString()
           
 java.lang.Object getType()
           
 java.lang.Object getWrapped()
           
 boolean isLeaf()
           
 void setLabel(java.lang.Object label)
           
 void setLeaf(boolean leaf)
           
 void setNodeString(java.lang.String nodeString)
           
 void setType(java.lang.Object type)
           
 void setWrapped(java.lang.Object wrapped)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxTreeNode

public AjaxTreeNode()
default empty constructor


AjaxTreeNode

public AjaxTreeNode(java.lang.String nodeString,
                    boolean leaf)

AjaxTreeNode

public AjaxTreeNode(java.lang.String nodeString,
                    boolean leaf,
                    java.lang.Object label)

AjaxTreeNode

public AjaxTreeNode(java.lang.String nodeString,
                    boolean leaf,
                    java.lang.Object label,
                    java.lang.Object type)

AjaxTreeNode

public AjaxTreeNode(java.lang.String nodeString,
                    boolean leaf,
                    java.lang.Object label,
                    java.lang.Object type,
                    java.lang.Object wrapped)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getLabel

public java.lang.Object getLabel()

setLabel

public void setLabel(java.lang.Object label)

getType

public java.lang.Object getType()

setType

public void setType(java.lang.Object type)

getNodeString

public java.lang.String getNodeString()

setNodeString

public void setNodeString(java.lang.String nodeString)

isLeaf

public boolean isLeaf()

setLeaf

public void setLeaf(boolean leaf)

getWrapped

public java.lang.Object getWrapped()

setWrapped

public void setWrapped(java.lang.Object wrapped)


Copyright © 2008. All Rights Reserved.