Project Wonder 5.0.0.8658

er.ajax
Class AjaxSelectionList

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

public class AjaxSelectionList
extends AjaxComponent

AjaxSelectionList provides a list component that supports keyboard navigation and component renderers. Externally, the component behaves like a form field, similar to WOPopUpButton except that it uses its component content as the renderer for each item instead of taking a displayString. The javascript wrapper exposes events of the selection changing, the item being selected (via double-click or the enter key), and an item being deleted (with the delete key).

Author:
mschrag
See Also:
Serialized Form
Bindings
elementName (optional) the type of element for the wrapper (ul, ol, table)
           
list (required) the list to render
           
item (required) bound for each item of the list
           
selection (optional) the current selection
           
mandatory (optional) if false, a null value will be prepended to the list. It is up to your component content to handle the null value to show a "No Selection" value. mandatory defaults to true. Mandatory does not imply any validation, it is the semantic equivalent of noSelectionString when compared to WOPopUpButton.
           
id (optional) the id of the list
           
class (optional) the css class of the list
           
style (optional) the css style of the list
           
name (optional) the form field name
           
onchange (optional) the javascript to execute when the selection changes
           
onselect (optional) the javascript to execute when the user presses enter or double-clicks
           
ondelete (optional) the javascript to execute when backspace or delete is pressed
           
focus (optional) if true, the selection list will be focused
           

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
 
Fields inherited from class er.ajax.AjaxComponent
log
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations, MINUSONE
 
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.NSValidation
_CLASS
 
Constructor Summary
AjaxSelectionList(WOContext context)
           
 
Method Summary
protected  void addRequiredWebResources(WOResponse res)
          Override this method to append the needed scripts for this component.
 String containerID()
           
 String elementName()
           
 String fieldID()
           
 WOActionResults handleRequest(WORequest request, WOContext context)
          Override this method to return the response for an Ajax request.
 String id()
           
 Object item()
           
 NSArray list()
           
 int selectedIndex()
           
 Object selection()
           
 void setItem(Object item)
           
 void setSelection(Object selection)
           
 void setValue(String value)
           
 void sleep()
           
 boolean synchronizesVariablesWithBindings()
           
 void takeValuesFromRequest(WORequest request, WOContext context)
           
 String value()
           
 
Methods inherited from class er.ajax.AjaxComponent
_containerID, addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, appendTagAttributeToResponse, appendToResponse, booleanValueForBinding, invokeAction, safeElementID, valueForBinding, valueForBinding, valueForBinding
 
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, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AjaxSelectionList

public AjaxSelectionList(WOContext context)
Method Detail

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
Overrides:
synchronizesVariablesWithBindings in class WOComponent

setItem

public void setItem(Object item)

item

public Object item()

sleep

public void sleep()
Overrides:
sleep in class WOComponent

list

public NSArray list()

elementName

public String elementName()

containerID

public String containerID()

fieldID

public String fieldID()

id

public String id()

selection

public Object selection()

setSelection

public void setSelection(Object selection)

setValue

public void setValue(String value)

value

public String value()

selectedIndex

public int selectedIndex()

takeValuesFromRequest

public void takeValuesFromRequest(WORequest request,
                                  WOContext context)
Overrides:
takeValuesFromRequest in class WOComponent

addRequiredWebResources

protected void addRequiredWebResources(WOResponse res)
Description copied from class: AjaxComponent
Override this method to append the needed scripts for this component.

Specified by:
addRequiredWebResources in class AjaxComponent

handleRequest

public WOActionResults handleRequest(WORequest request,
                                     WOContext context)
Description copied from class: AjaxComponent
Override this method to return the response for an Ajax request.

Specified by:
handleRequest in interface IAjaxElement
Specified by:
handleRequest in class AjaxComponent

Last updated: Fri, Nov 21, 2008 • 04:36 AM EST

Copyright © 2002 – 2007 Project Wonder.