AjaxTree Class Reference

Inherits com::webobjects::appserver::WOComponent.

Collaboration diagram for AjaxTree:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int _closeCount ()
String _toggleFunctionName ()
 AjaxTree (WOContext context)
void appendToResponse (WOResponse aResponse, WOContext aContext)
WOActionResults collapse ()
String collapsedImage ()
String collapsedImageFramework ()
WOActionResults expand ()
String expandedImage ()
String expandedImageFramework ()
String id ()
String imageLinkClass ()
WOActionResults invokeAction (WORequest aRequest, WOContext aContext)
boolean isExpanded ()
boolean isLeaf ()
Object item ()
String leafImage ()
String leafImageFramework ()
String nodeItem ()
NSArray nodes ()
void reset ()
void setItem (Object item)
void setTreeModel (AjaxTreeModel treeModel)
boolean synchronizesVariablesWithBindings ()
void takeValuesFromRequest (WORequest aRequest, WOContext aContext)
AjaxTreeModel treeModel ()

Protected Member Functions

void _fillInOpenNodes (Object node, NSMutableArray nodes, boolean showNode)
void resetTree ()
String stringValueForBinding (String bindingName, String defaultValue)

Private Attributes

int _closeCount
String _id = null
Object _item
Object _lastParent
Object _lastRootNode
int _level
NSArray _nodes
AjaxTreeModel _treeModel


Detailed Description

AjaxTree provides an Ajax-refreshing tree view. AjaxTree acts like a WOComponentContent where the content you provide will be the renderer for the tree nodes. The "item" binding provides you access to the current tree node as it iterates over the tree.

If your node objects are homogenous in type, you can define parentKeyPath and childrenKeyPath. If your node objects are heterogenous, you can instead define a delegate, as defined in the AjaxTreeModel.Delegate interface.

root the root node of the tree item the current tree node (equivalent to "item" on WORepetition) itemClass the class of the current item itemID the id of the current item rootExpanded if true, the tree will require the root node to be open; ignored if showRoot = false allExpanded if true, the tree defaults to have all its nodes expanded parentKeyPath the keypath to call on a node to get its parent node (ignored if delegate is set) childrenKeyPath the keypath to call on a node to get its children NSArray (ignored if delegate is set) isLeafKeyPath the keypath to call on a node to determine if it is a leaf node (ignored if delegate, and defaults to return childrenKeyPath.count() == 0 if not set) id the html id of the tree class the html class of the tree treeModel the treeModel to use (one will be created by default) collapsedImage the icon to use for a collapsed node collapsedImageFramework the framework to load the collapsed icon from expandedImage the icon to use for an expanded node expandedImageFramework the framework to load the expanded icon from leafImage the icon to use for a leaf node leafImageFramework the framework to load the leaf icon from delegate the delegate to use instead of keypaths (see AjaxTreeModel.Delegate) showRoot if false, the root node will be skipped and the tree will begin with its children cache whether to cache the nodes or determine them every time from the model (default: true)

Author:
mschrag

Constructor & Destructor Documentation

AjaxTree ( WOContext  context  ) 


Member Function Documentation

int _closeCount (  ) 

void _fillInOpenNodes ( Object  node,
NSMutableArray  nodes,
boolean  showNode 
) [protected]

String _toggleFunctionName (  ) 

void appendToResponse ( WOResponse  aResponse,
WOContext  aContext 
)

WOActionResults collapse (  ) 

String collapsedImage (  ) 

String collapsedImageFramework (  ) 

WOActionResults expand (  ) 

String expandedImage (  ) 

String expandedImageFramework (  ) 

String id (  ) 

String imageLinkClass (  ) 

WOActionResults invokeAction ( WORequest  aRequest,
WOContext  aContext 
)

boolean isExpanded (  ) 

boolean isLeaf (  ) 

Object item (  ) 

String leafImage (  ) 

String leafImageFramework (  ) 

String nodeItem (  ) 

NSArray nodes (  ) 

void reset (  ) 

void resetTree (  )  [protected]

void setItem ( Object  item  ) 

void setTreeModel ( AjaxTreeModel  treeModel  ) 

String stringValueForBinding ( String  bindingName,
String  defaultValue 
) [protected]

boolean synchronizesVariablesWithBindings (  ) 

void takeValuesFromRequest ( WORequest  aRequest,
WOContext  aContext 
)

AjaxTreeModel treeModel (  ) 


Member Data Documentation

int _closeCount [private]

String _id = null [private]

Object _item [private]

Object _lastParent [private]

Object _lastRootNode [private]

int _level [private]

NSArray _nodes [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:40 2012 for Project Wonder by  doxygen 1.5.8