org.olat.core.gui.control.generic.ajax.tree
Class AjaxTreeModel

java.lang.Object
  extended by org.olat.core.gui.control.generic.ajax.tree.AjaxTreeModel
Direct Known Subclasses:
CatalogAjaxTreeModel, CPTreeDataModel, CustomLinkTreeModel

public abstract class AjaxTreeModel
extends java.lang.Object

Description:
The ajax tree model provides method for the ajax tree to dynamically build the tree based on user selection. Compared to the standard tree model the tree is not browsed via the child relationship but rather by the getChildrenForm method.

Initial Date: 30.05.2008

Author:
gnaegi

Constructor Summary
AjaxTreeModel(java.lang.String treeModelIdentifyer)
          Constructor
 
Method Summary
abstract  java.util.List<AjaxTreeNode> getChildrenFor(java.lang.String nodeId)
          Returns the list of children for this node.
 java.lang.String getCustomRootIconCssClass()
          Get the custom CSS icon for the root node or NULL if the default icon is used
 java.lang.String getTreeModelIdentifyer()
           
 void setCustomRootIconCssClass(java.lang.String rootIconCssClass)
          Set a custom CSS class icon for the root node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxTreeModel

public AjaxTreeModel(java.lang.String treeModelIdentifyer)
Constructor

Parameters:
treeModelIdentifyer - to identify the the tree, is also used for the root node and to store and restore the tree state
Method Detail

getTreeModelIdentifyer

public final java.lang.String getTreeModelIdentifyer()
Returns:
the identifyer for this tree.

setCustomRootIconCssClass

public final void setCustomRootIconCssClass(java.lang.String rootIconCssClass)
Set a custom CSS class icon for the root node. The default icon is an opened and closed folder icon. Use NULL to reset to default.

Parameters:
rootIconCssClass -

getCustomRootIconCssClass

public final java.lang.String getCustomRootIconCssClass()
Get the custom CSS icon for the root node or NULL if the default icon is used

Returns:

getChildrenFor

public abstract java.util.List<AjaxTreeNode> getChildrenFor(java.lang.String nodeId)
Returns the list of children for this node.

Parameters:
nodeId - The ID of the given node.
Returns: