er.ajax
Class AjaxTree
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.ajax.AjaxTree
- All Implemented Interfaces:
- WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable
public class AjaxTree
- extends WOComponent
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.
- Author:
- mschrag
- See Also:
- Serialized Form
| Bindings |
root | the root node of the tree |
item | the current tree node (equivalent to "item" on WORepetition) |
itemClass | the class 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) |
| Methods inherited from class com.webobjects.appserver.WOComponent |
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding |
AjaxTree
public AjaxTree(WOContext context)
synchronizesVariablesWithBindings
public boolean synchronizesVariablesWithBindings()
- Overrides:
synchronizesVariablesWithBindings in class WOComponent
nodes
public NSArray nodes()
_fillInOpenNodes
protected void _fillInOpenNodes(Object node,
NSMutableArray nodes,
boolean showNode)
reset
public void reset()
- Overrides:
reset in class WOComponent
resetTree
protected void resetTree()
appendToResponse
public void appendToResponse(WOResponse aResponse,
WOContext aContext)
- Overrides:
appendToResponse in class WOComponent
takeValuesFromRequest
public void takeValuesFromRequest(WORequest aRequest,
WOContext aContext)
- Overrides:
takeValuesFromRequest in class WOComponent
invokeAction
public WOActionResults invokeAction(WORequest aRequest,
WOContext aContext)
- Overrides:
invokeAction in class WOComponent
setItem
public void setItem(Object item)
item
public Object item()
isLeaf
public boolean isLeaf()
isExpanded
public boolean isExpanded()
_closeCount
public int _closeCount()
setTreeModel
public void setTreeModel(AjaxTreeModel treeModel)
treeModel
public AjaxTreeModel treeModel()
id
public String id()
stringValueForBinding
protected String stringValueForBinding(String bindingName,
String defaultValue)
collapsedImage
public String collapsedImage()
collapsedImageFramework
public String collapsedImageFramework()
expandedImage
public String expandedImage()
expandedImageFramework
public String expandedImageFramework()
leafImage
public String leafImage()
leafImageFramework
public String leafImageFramework()
imageLinkClass
public String imageLinkClass()
nodeItem
public String nodeItem()
_toggleFunctionName
public String _toggleFunctionName()
expand
public WOActionResults expand()
collapse
public WOActionResults collapse()
Copyright © 2002 – 2007 Project Wonder.