er.modern.directtoweb.components.relationships
Class ERMD2WEditToOneTypeAhead
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.directtoweb.components.ERDCustomComponent
er.directtoweb.components.ERDCustomEditComponent
er.modern.directtoweb.components.relationships.ERMD2WEditToOneTypeAhead
- All Implemented Interfaces:
- com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, ERXExceptionHolder, java.io.Serializable, java.lang.Cloneable
public class ERMD2WEditToOneTypeAhead
- extends ERDCustomEditComponent
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.
- See Also:
- Serialized Form
- Author:
- davidleber
| 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 |
| Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException |
|
Field Summary |
com.webobjects.eocontrol.EOEnterpriseObject |
item
|
static org.apache.log4j.Logger |
log
|
| Fields inherited from class com.webobjects.appserver.WOComponent |
_Extension, _IsEventLoggingEnabled, _keyAssociations |
| 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.NSKeyValueCoding |
NullValue |
| Fields inherited from interface com.webobjects.foundation.NSValidation |
_CLASS |
| Methods inherited from class er.directtoweb.components.ERDCustomEditComponent |
defaultSortOrderingsForDestinationEntity, destinationEntity, isStateless, object, objectKeyPathValue, objectPropertyValue, permissionToEdit, reset, resetCachedBindingsInStatefulComponent, setObject, setObjectKeyPathValue, setObjectPropertyValue |
| Methods inherited from class er.directtoweb.components.ERDCustomComponent |
appendToResponse, 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, valueForBinding |
| Methods inherited from class er.extensions.components.ERXComponent |
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript |
| Methods inherited from class com.webobjects.appserver.WOComponent |
_associationWithName, _childTemplate, _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, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
public static org.apache.log4j.Logger log
item
public com.webobjects.eocontrol.EOEnterpriseObject item
ERMD2WEditToOneTypeAhead
public ERMD2WEditToOneTypeAhead(com.webobjects.appserver.WOContext context)
awake
public void awake()
- Overrides:
awake in class com.webobjects.appserver.WOComponent
sleep
public void sleep()
- Overrides:
sleep in class com.webobjects.appserver.WOComponent
relatedObjectDidChange
public void relatedObjectDidChange(com.webobjects.foundation.NSNotification notif)
- Called when an
ERMDActionButton changes the related object. Nulls
_searchValue which in turn lets it rebuild on the next display
synchronizesVariablesWithBindings
public boolean synchronizesVariablesWithBindings()
- Description copied from class:
ERDCustomComponent
- Overridden from superclass to turn on component synching, which is the default.
- Overrides:
synchronizesVariablesWithBindings in class ERDCustomEditComponent
searchValue
public 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'
- Returns:
setSearchValue
public void setSearchValue(java.lang.String value)
- Sets the searchValue
- Parameters:
value -
currentSelection
public com.webobjects.eocontrol.EOEnterpriseObject currentSelection()
- Returns the currently selected destination entity
- Returns:
currentObjects
public com.webobjects.foundation.NSArray<com.webobjects.eocontrol.EOEnterpriseObject> currentObjects()
- Returns the array of available matching destination entities
- Returns:
itemDisplayString
public java.lang.String itemDisplayString()
- Returns the display value for the available matching destination entities in the
drop down list.
- Returns:
selectObject
public com.webobjects.appserver.WOActionResults selectObject()
- Action called when the user makes a selection from the AjaxAutoComplete
- Returns:
addObject
public com.webobjects.appserver.WOActionResults addObject()
- Action called when user clicks the Add button
- Returns:
dataSource
public com.webobjects.eocontrol.EODataSource dataSource()
useFetch
public boolean useFetch()
- Should this component use a fetch to qualify the list of available destination entities
- Returns:
- true if the 'keyWhenRelationship' is the name of an attribute
destinationObjectsWithQualifier
public com.webobjects.foundation.NSArray<com.webobjects.eocontrol.EOEnterpriseObject> destinationObjectsWithQualifier(com.webobjects.eocontrol.EOQualifier qual)
destinationEntityName
public java.lang.String destinationEntityName()
sortKey
public java.lang.String sortKey()
propertyKey
public java.lang.String propertyKey()
setPropertyKey
public void setPropertyKey(java.lang.String key)
allItems
public com.webobjects.foundation.NSArray<com.webobjects.eocontrol.EOEnterpriseObject> allItems()
restrictingFetchSpec
public com.webobjects.eocontrol.EOFetchSpecification restrictingFetchSpec()
restrictedChoiceKey
public java.lang.String restrictedChoiceKey()
restrictingFetchSpecificationName
public java.lang.String restrictingFetchSpecificationName()
searchTemplate
public java.lang.String searchTemplate()
extraQualifier
public com.webobjects.eocontrol.EOQualifier extraQualifier()
minimumCharacterCount
public java.lang.Integer minimumCharacterCount()
keyWhenRelationship
public java.lang.String keyWhenRelationship()
restrictedChoiceList
public java.lang.Object restrictedChoiceList()
newButtonClass
public java.lang.String newButtonClass()
newButtonLabel
public java.lang.String newButtonLabel()
searchTermSelectedFunctionName
public java.lang.String searchTermSelectedFunctionName()
searchTermSelectedFunction
public java.lang.String searchTermSelectedFunction()
Copyright © 2002 – 2007 Project Wonder.