public abstract class ERXArrayChooser extends ERXStatelessComponent
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. Also adds the values that are not included in the restricted-choice list. These items are marked by [name of item]. This should ensure they end up at the bottom of the list. You can also specify the editingContext the component uses to fetch the related objects into. NOTE: currently "includeUnmatchedValues" is set to false
WOComponent._EventLoggingEnabler, WOComponent.EventNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessorNSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException| Modifier and Type | Field and Description |
|---|---|
protected EODataSource |
_dataSource |
protected java.lang.String |
_destinationDisplayKey |
protected java.lang.String |
_destinationEntityName |
protected java.lang.String |
_destinationSortKey |
protected java.lang.Boolean |
_includeUnmatchedValues |
protected java.lang.Boolean |
_isMandatory |
protected NSArray |
_list |
protected java.lang.Boolean |
_localizeDisplayKeys |
protected java.lang.String |
_noneString |
protected java.lang.String |
_relationshipKey |
protected java.lang.Boolean |
_sortCaseInsensitive |
protected java.lang.String |
_sourceEntityName |
protected java.lang.Object |
_sourceObject |
protected java.lang.String |
_uiStyle |
protected NSArray |
_unmatchedValues |
static boolean |
includeUnmatchedValuesDefault |
static boolean |
localizeDisplayKeysDefault |
static org.apache.log4j.Logger |
log
logging support
|
protected static java.lang.String |
NO_SELECTION_STRING |
protected static java.lang.String |
NO_SORT_STRING |
static boolean |
sortCaseInsensitiveDefault |
protected java.lang.Object |
theCurrentItem |
_dynamicBindings_Extension, _IsEventLoggingEnabled, _keyAssociations_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue_CLASS| Constructor and Description |
|---|
ERXArrayChooser(WOContext aContext) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
_destinationEntityName(boolean throwExceptionIfMissing) |
abstract NSArray |
currentValues() |
EODataSource |
dataSource() |
java.lang.String |
destinationDisplayKey() |
protected EOEntity |
destinationEntity() |
java.lang.String |
destinationEntityName() |
java.lang.String |
destinationSortKey() |
protected NSArray |
destinationSortKeys() |
EOEditingContext |
editingContext() |
boolean |
includeUnmatchedValues() |
boolean |
isBrowser() |
boolean |
isCheckBox() |
boolean |
isMandatory() |
boolean |
isPopup() |
boolean |
isRadio() |
protected abstract boolean |
isSingleSelection() |
protected void |
loadBindingsFromSelection()
I'm lazy.
|
boolean |
localizeDisplayKeys() |
java.lang.String |
noneString() |
EOQualifier |
qualifier() |
protected java.lang.String |
realRelationshipKey() |
protected java.lang.Object |
realSourceObject() |
java.lang.String |
relationshipKey() |
void |
reset()
このメソッドは、指定されているコンテクストのオブジェクトに対する、
ステートレス・コンポーネントの一時的リファレンスをリセットもしくは削除します。
あるコンポーネントの共有化されたインスタンスが、他のセッションによって再利用されるとき、
このメソッドを利用し、各コンポーネントのインスタンス変数を解放します。
|
void |
setTheCurrentItem(java.lang.Object aValue) |
boolean |
sortCaseInsensitive() |
java.lang.String |
sourceEntityName() |
java.lang.Object |
sourceObject() |
void |
takeValuesFromRequest(WORequest r,
WOContext c)
Calls
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.takeValuesFromRequest. |
java.lang.Object |
theCurrentItem() |
java.lang.Object |
theCurrentValue() |
NSArray |
theList() |
java.lang.String |
uiStyle() |
NSArray |
unmatchedValues() |
isStateless, valueForBooleanBinding, valueForBooleanBinding, valueForBooleanBinding, valueForIntBinding, valueForObjectBinding, valueForObjectBindingappendToResponse, invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browser, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript__valueForBinding, _associationWithName, _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, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithNamepublic static final org.apache.log4j.Logger log
public static boolean localizeDisplayKeysDefault
public static boolean includeUnmatchedValuesDefault
public static boolean sortCaseInsensitiveDefault
protected static final java.lang.String NO_SELECTION_STRING
protected static final java.lang.String NO_SORT_STRING
protected java.lang.Boolean _localizeDisplayKeys
protected java.lang.Boolean _includeUnmatchedValues
protected java.lang.Boolean _sortCaseInsensitive
protected java.lang.String _sourceEntityName
protected java.lang.String _destinationEntityName
protected java.lang.String _relationshipKey
protected java.lang.Object _sourceObject
protected java.lang.String _destinationDisplayKey
protected EODataSource _dataSource
protected java.lang.String _uiStyle
protected java.lang.Boolean _isMandatory
protected NSArray _list
protected NSArray _unmatchedValues
protected java.lang.String _destinationSortKey
protected java.lang.String _noneString
protected java.lang.Object theCurrentItem
public ERXArrayChooser(WOContext aContext)
protected abstract boolean isSingleSelection()
public void reset()
ERXComponentreset in class ERXStatelessComponentpublic java.lang.String noneString()
public boolean sortCaseInsensitive()
public boolean localizeDisplayKeys()
public boolean includeUnmatchedValues()
public java.lang.String sourceEntityName()
public java.lang.String destinationSortKey()
public NSArray unmatchedValues()
protected NSArray destinationSortKeys()
public EOEditingContext editingContext()
protected void loadBindingsFromSelection()
I'm lazy. I don't want to bind sourceObject, sourceEntityName, and relationshipKey. Work it out, Wonder, that's what I say. So if you bind, for instance:
selection = person.company;
... it will figure out that the sourceObject is "person", the relationshipKey is "company" and the sourceEntityName is "Person".
protected EOEntity destinationEntity()
public java.lang.String destinationEntityName()
public java.lang.String _destinationEntityName(boolean throwExceptionIfMissing)
public java.lang.String relationshipKey()
public java.lang.Object sourceObject()
public java.lang.String destinationDisplayKey()
public EOQualifier qualifier()
public EODataSource dataSource()
public java.lang.String uiStyle()
public boolean isMandatory()
public boolean isCheckBox()
public boolean isRadio()
public boolean isPopup()
public boolean isBrowser()
public java.lang.Object theCurrentItem()
public void setTheCurrentItem(java.lang.Object aValue)
public abstract NSArray currentValues()
public NSArray theList()
public java.lang.Object theCurrentValue()
public void takeValuesFromRequest(WORequest r, WOContext c)
ERXNonSynchronizingComponentERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.takeValuesFromRequest.takeValuesFromRequest in class ERXNonSynchronizingComponentr - from which the values will be takenc - of the requestprotected java.lang.Object realSourceObject()
protected java.lang.String realRelationshipKey()
Copyright © 2002 – 2022 Project Wonder.