Project Wonder 5.0

er.ajax
Class AjaxTree

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.ajax.AjaxTree
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, java.io.Serializable, java.lang.Cloneable

public class AjaxTree
extends com.webobjects.appserver.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.

See Also:
Serialized Form
Author:
mschrag
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
           
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)
           

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
AjaxTree(com.webobjects.appserver.WOContext context)
           
 
Method Summary
 int _closeCount()
           
protected  void _fillInOpenNodes(java.lang.Object node, com.webobjects.foundation.NSMutableArray nodes, boolean showNode)
           
 java.lang.String _toggleFunctionName()
           
 void appendToResponse(com.webobjects.appserver.WOResponse aResponse, com.webobjects.appserver.WOContext aContext)
           
 com.webobjects.appserver.WOActionResults collapse()
           
 java.lang.String collapsedImage()
           
 java.lang.String collapsedImageFramework()
           
 com.webobjects.appserver.WOActionResults expand()
           
 java.lang.String expandedImage()
           
 java.lang.String expandedImageFramework()
           
 java.lang.String id()
           
 java.lang.String imageLinkClass()
           
 com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest aRequest, com.webobjects.appserver.WOContext aContext)
           
 boolean isExpanded()
           
 boolean isLeaf()
           
 java.lang.Object item()
           
 java.lang.String leafImage()
           
 java.lang.String leafImageFramework()
           
 java.lang.String nodeItem()
           
 com.webobjects.foundation.NSArray nodes()
           
 void reset()
           
protected  void resetTree()
           
 void setItem(java.lang.Object item)
           
 void setTreeModel(AjaxTreeModel treeModel)
           
protected  java.lang.String stringValueForBinding(java.lang.String bindingName, java.lang.String defaultValue)
           
 boolean synchronizesVariablesWithBindings()
           
 void takeValuesFromRequest(com.webobjects.appserver.WORequest aRequest, com.webobjects.appserver.WOContext aContext)
           
 AjaxTreeModel treeModel()
           
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _awakeInContext, _childTemplate, _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, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxTree

public AjaxTree(com.webobjects.appserver.WOContext context)
Method Detail

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
Overrides:
synchronizesVariablesWithBindings in class com.webobjects.appserver.WOComponent

nodes

public com.webobjects.foundation.NSArray nodes()

_fillInOpenNodes

protected void _fillInOpenNodes(java.lang.Object node,
                                com.webobjects.foundation.NSMutableArray nodes,
                                boolean showNode)

reset

public void reset()
Overrides:
reset in class com.webobjects.appserver.WOComponent

resetTree

protected void resetTree()

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse aResponse,
                             com.webobjects.appserver.WOContext aContext)
Overrides:
appendToResponse in class com.webobjects.appserver.WOComponent

takeValuesFromRequest

public void takeValuesFromRequest(com.webobjects.appserver.WORequest aRequest,
                                  com.webobjects.appserver.WOContext aContext)
Overrides:
takeValuesFromRequest in class com.webobjects.appserver.WOComponent

invokeAction

public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest aRequest,
                                                             com.webobjects.appserver.WOContext aContext)
Overrides:
invokeAction in class com.webobjects.appserver.WOComponent

setItem

public void setItem(java.lang.Object item)

item

public java.lang.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 java.lang.String id()

stringValueForBinding

protected java.lang.String stringValueForBinding(java.lang.String bindingName,
                                                 java.lang.String defaultValue)

collapsedImage

public java.lang.String collapsedImage()

collapsedImageFramework

public java.lang.String collapsedImageFramework()

expandedImage

public java.lang.String expandedImage()

expandedImageFramework

public java.lang.String expandedImageFramework()

leafImage

public java.lang.String leafImage()

leafImageFramework

public java.lang.String leafImageFramework()

imageLinkClass

public java.lang.String imageLinkClass()

nodeItem

public java.lang.String nodeItem()

_toggleFunctionName

public java.lang.String _toggleFunctionName()

expand

public com.webobjects.appserver.WOActionResults expand()

collapse

public com.webobjects.appserver.WOActionResults collapse()

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.