public class ERMD2WEditToOneTypeAhead extends ERDCustomEditComponent implements ERMD2WAttributeQueryDelegate.ERMD2WQueryComponent
A to-one relationship edit component that allows a user to select from a list by typing in the text field
It uses the 'keyWhenRelationship' from the d2w rules for this relationship to display and query. Because it uses an AjaxAutoComplet the keyWhenRelationshp must be able to uniquely identify the found entity. It can either be a string attribute or a helper method that returns a constructed unique string.
If the keyWhenRelationship represents an attribute, this component will qualify the list of possible matches via a fetch. Otherwise it will load ALL of the available destinationEntities and qualify in memory. Keep this in mind when deciding how to use this component.
| D2W Keys | |
restrictedChoiceKey | - keypath off the component that returns a list of objects to be searched from (only used when keyWhenRelationship is NOT an attribute) |
restrictingFetchSpecification | - name of the model FetchSpec supplies the list of objects to be searched from (keyWhenRelationship is NOT an attribute) or that additionally qualifies the fetch |
extraRestrictingQualifier | - an additional qualifier (defined in the rules) that additionally qualifies the search |
typeAheadSearchTemplate | - a template that wraps the searchValue (for the inclusion of pre/post wildcards: i.e: "*@@searchValue@@*" ) |
typeAheadMinimumCharaceterCount | - minimum number of characters before a search is performed |
sortKey | sortKey |
isMandatory | isMandatory |
propertyKey | propertyKey |
destinationEntityName | destinationEntityName |
sortCaseInsensitive | sortCaseInsensitive |
pageConfiguration | pageConfiguration |
createConfigurationName | createConfigurationName |
keyWhenRelationship | keyWhenRelationship |
newButtonLabel | newButtonLabel |
searchKey | searchKey |
| Modifier and Type | Class and Description |
|---|---|
static interface |
ERMD2WEditToOneTypeAhead.Keys |
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 |
|---|---|
EOEnterpriseObject |
item |
static org.apache.log4j.Logger |
log |
editingContextextraBindings, FALSE, TRUE_dynamicBindings_Extension, _IsEventLoggingEnabled, _keyAssociations_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue_CLASS| Constructor and Description |
|---|
ERMD2WEditToOneTypeAhead(WOContext context) |
| Modifier and Type | Method and Description |
|---|---|
WOActionResults |
addObject()
Action called when user clicks the Add button
|
NSArray<EOEnterpriseObject> |
allItems() |
void |
awake() |
NSArray<EOEnterpriseObject> |
currentObjects()
Returns the array of available matching destination entities
|
EOEnterpriseObject |
currentSelection()
Returns the currently selected destination entity
|
EODataSource |
dataSource() |
java.lang.String |
destinationEntityName() |
NSArray<EOEnterpriseObject> |
destinationObjectsWithQualifier(EOQualifier qual) |
EOQualifier |
extraQualifier() |
boolean |
isEntityCreatable()
Should the 'new' button be displayed?
|
boolean |
isEntityInspectable()
Should the 'inspect' button be displayed?
|
java.lang.String |
itemDisplayString()
Returns the display value for the available matching destination entities in the
drop down list.
|
java.lang.String |
keyWhenRelationship() |
java.lang.Integer |
minimumCharacterCount() |
java.lang.String |
newButtonClass() |
java.lang.String |
newButtonLabel() |
java.lang.String |
propertyKey() |
void |
relatedObjectDidChange(NSNotification notif)
Called when an
ERMDActionButton changes the related object. |
java.lang.String |
restrictedChoiceKey() |
java.lang.Object |
restrictedChoiceList() |
EOFetchSpecification |
restrictingFetchSpec() |
java.lang.String |
restrictingFetchSpecificationName() |
java.lang.String |
searchTemplate() |
java.lang.String |
searchTermSelectedFunction() |
java.lang.String |
searchTermSelectedFunctionName() |
java.lang.String |
searchValue()
Value displayed by the AjaxAutoFill field, if nothing is entered in the
field it will return either the kvc value of 'keyWhenRelationship' on the related
entity or the kvc value of 'userPresentableDescription'
|
WOActionResults |
selectObject()
Action called when the user makes a selection from the AjaxAutoComplete
|
void |
setPropertyKey(java.lang.String key) |
void |
setSearchValue(java.lang.String value)
Sets the searchValue
|
void |
sleep() |
java.lang.String |
sortKey() |
boolean |
synchronizesVariablesWithBindings()
Overridden from superclass to turn on component synching, which is the default.
|
boolean |
useFetch()
Should this component use a fetch to qualify the list of available destination entities
|
defaultSortOrderingsForDestinationEntity, destinationEntity, isStateless, object, objectKeyPathValue, objectPropertyValue, permissionToEdit, reset, resetCachedBindingsInStatefulComponent, setObject, setObjectKeyPathValue, setObjectPropertyValueappendToResponse, booleanForBinding, clearValidationFailed, d2wComponentNameDebuggingEnabled, d2wContext, d2wContextFromBindings, d2wContextValueForBinding, d2wDebuggingEnabled, d2wPage, d2wPropertyKeyDebuggingEnabled, extraBindings, extraBindingsValueForBinding, hasBinding, integerBooleanForBinding, key, localContext, logDebugInfo, originalValueForBinding, parentValueForBinding, setD2wContext, setExtraBindings, setKey, setLocalContext, task, taskIsEdit, taskIsInspect, taskIsList, validationFailedWithException, valueForBindinginvokeAction, takeValuesFromRequest_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, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithNameequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitd2wContextpublic static org.apache.log4j.Logger log
public EOEnterpriseObject item
public ERMD2WEditToOneTypeAhead(WOContext context)
public void awake()
awake in class WOComponentpublic void sleep()
sleep in class WOComponentpublic void relatedObjectDidChange(NSNotification notif)
ERMDActionButton changes the related object. Nulls
_searchValue which in turn lets it rebuild on the next displaypublic boolean synchronizesVariablesWithBindings()
ERDCustomComponentsynchronizesVariablesWithBindings in class ERDCustomEditComponentfalsepublic java.lang.String searchValue()
searchValue in interface ERMD2WAttributeQueryDelegate.ERMD2WQueryComponentpublic void setSearchValue(java.lang.String value)
value - public EOEnterpriseObject currentSelection()
public NSArray<EOEnterpriseObject> currentObjects()
public java.lang.String itemDisplayString()
public WOActionResults selectObject()
public WOActionResults addObject()
public EODataSource dataSource()
dataSource in interface ERMD2WAttributeQueryDelegate.ERMD2WQueryComponentpublic boolean useFetch()
public NSArray<EOEnterpriseObject> destinationObjectsWithQualifier(EOQualifier qual)
public java.lang.String destinationEntityName()
public java.lang.String sortKey()
public java.lang.String propertyKey()
public void setPropertyKey(java.lang.String key)
public NSArray<EOEnterpriseObject> allItems()
public EOFetchSpecification restrictingFetchSpec()
public java.lang.String restrictedChoiceKey()
public java.lang.String restrictingFetchSpecificationName()
public java.lang.String searchTemplate()
public EOQualifier extraQualifier()
public java.lang.Integer minimumCharacterCount()
public java.lang.String keyWhenRelationship()
public java.lang.Object restrictedChoiceList()
public java.lang.String newButtonClass()
public java.lang.String newButtonLabel()
public java.lang.String searchTermSelectedFunctionName()
public java.lang.String searchTermSelectedFunction()
public boolean isEntityCreatable()
public boolean isEntityInspectable()
Copyright © 2002 – 2022 Project Wonder.