er.ajax
Class AjaxSelectionList
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.ajax.AjaxComponent
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 |
| 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 |
AjaxSelectionList
public AjaxSelectionList(WOContext context)
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
Copyright © 2002 – 2007 Project Wonder.