er.extensions
Class ERXArrayChooser
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.ERXNonSynchronizingComponent
er.extensions.ERXStatelessComponent
er.extensions.ERXArrayChooser
- All Implemented Interfaces:
- Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults
- Direct Known Subclasses:
- WOToManyRelationship, WOToOneRelationship
- public abstract class ERXArrayChooser
- extends ERXStatelessComponent
This is an effort to consolidate the WOToOneRelationship, WOToManyRelationship and descendant components.
As most of the code between the two is shared anyway, it makes sense to provide a base class and only
handle the differences in the descendants. One core difference if that this component can handle POJOs both as the
source and the destination objects. You can't instantiate one of these yourself.
This class can handle to-one, to-many and simple attribute selections. You can can set the list via
possibleChoices, dataSource, destinationEntityName or via sourceEntityName and relationshipKey.
The main difference between this component and the former WOToOne/WOToMany is that it is non-synchronizing. So if
you have custom subclasses of WOToOne/WOToMany you need to take this into account.
- Author:
- ak (but most stuff is pulled over from the pre-existing WOToOne/WOToMany)
- See Also:
- Serialized Form
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding |
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor |
Methods inherited from class er.extensions.ERXNonSynchronizingComponent |
booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, dynamicBindings, intValueForBinding, localizer, objectValueForBinding, objectValueForBinding, stringValueForBinding, stringValueForBinding, synchronizesVariablesWithBindings |
Methods inherited from class com.webobjects.appserver.WOComponent |
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, 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 |
log
public static final ERXLogger log
- logging support
localizeDisplayKeysDefault
public static boolean localizeDisplayKeysDefault
NO_SELECTION_STRING
protected static final String NO_SELECTION_STRING
- See Also:
- Constant Field Values
_localizeDisplayKeys
protected Boolean _localizeDisplayKeys
_sourceEntityName
protected String _sourceEntityName
_destinationEntityName
protected String _destinationEntityName
_relationshipKey
protected String _relationshipKey
_sourceObject
protected Object _sourceObject
_destinationDisplayKey
protected String _destinationDisplayKey
_dataSource
protected EODataSource _dataSource
_uiStyle
protected String _uiStyle
_isMandatory
protected Boolean _isMandatory
_list
protected NSArray _list
_destinationSortKey
protected String _destinationSortKey
_noneString
protected String _noneString
theCurrentItem
protected Object theCurrentItem
ERXArrayChooser
public ERXArrayChooser(WOContext aContext)
isSingleSelection
protected abstract boolean isSingleSelection()
reset
public void reset()
- Overrides:
reset
in class ERXStatelessComponent
noneString
public String noneString()
localizeDisplayKeys
public boolean localizeDisplayKeys()
sourceEntityName
public String sourceEntityName()
destinationSortKey
public String destinationSortKey()
destinationSortKeys
protected NSArray destinationSortKeys()
editingContext
protected EOEditingContext editingContext()
destinationEntity
protected EOEntity destinationEntity()
destinationEntityName
public String destinationEntityName()
relationshipKey
public String relationshipKey()
sourceObject
public Object sourceObject()
destinationDisplayKey
public String destinationDisplayKey()
dataSource
public EODataSource dataSource()
uiStyle
public String uiStyle()
isMandatory
public boolean isMandatory()
isCheckBox
public boolean isCheckBox()
isRadio
public boolean isRadio()
isPopup
public boolean isPopup()
isBrowser
public boolean isBrowser()
theCurrentItem
public Object theCurrentItem()
setTheCurrentItem
public void setTheCurrentItem(Object aValue)
theList
public NSArray theList()
theCurrentValue
public Object theCurrentValue()
takeValuesFromRequest
public void takeValuesFromRequest(WORequest r,
WOContext c)
realSourceObject
protected Object realSourceObject()
realRelationshipKey
protected String realRelationshipKey()
Copyright © 2002 – 2004 Project Wonder.