ERMD2WEditToOneTypeAhead Class Reference

Inherits er::directtoweb::components::ERDCustomEditComponent.

Collaboration diagram for ERMD2WEditToOneTypeAhead:

Collaboration graph
[legend]

List of all members.

Classes

interface  Keys

Public Member Functions

WOActionResults addObject ()
NSArray< EOEnterpriseObject > allItems ()
void awake ()
NSArray< EOEnterpriseObject > currentObjects ()
EOEnterpriseObject currentSelection ()
EODataSource dataSource ()
String destinationEntityName ()
NSArray< EOEnterpriseObject > destinationObjectsWithQualifier (EOQualifier qual)
 ERMD2WEditToOneTypeAhead (WOContext context)
EOQualifier extraQualifier ()
String itemDisplayString ()
String keyWhenRelationship ()
Integer minimumCharacterCount ()
String newButtonClass ()
String newButtonLabel ()
String propertyKey ()
void relatedObjectDidChange (NSNotification notif)
String restrictedChoiceKey ()
Object restrictedChoiceList ()
EOFetchSpecification restrictingFetchSpec ()
String restrictingFetchSpecificationName ()
String searchTemplate ()
String searchTermSelectedFunction ()
String searchTermSelectedFunctionName ()
String searchValue ()
WOActionResults selectObject ()
void setPropertyKey (String key)
void setSearchValue (String value)
void sleep ()
String sortKey ()
boolean synchronizesVariablesWithBindings ()
boolean useFetch ()

Public Attributes

EOEnterpriseObject item

Static Public Attributes

static Logger log = Logger.getLogger(ERMD2WEditToOneTypeAhead.class)

Private Member Functions

EOEditingContext ec ()

Private Attributes

NSArray< EOEnterpriseObject > _allItems
EOEnterpriseObject _currentSelection
String _destinationEntityName
EOQualifier _extraQualifier
String _keyWhenRelationship
Integer _minimumCharacterCount
String _newButtonClass
String _newButtonLabel
String _propertyKey
String _restrictedChoiceKey
EOFetchSpecification _restrictingFetchSpec
String _restrictingFetchSpecification
String _safeElementID
String _searchValue
String _sortKey
String _template


Detailed Description

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.

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 isMandatory propertyKey destinationEntityName sortCaseInsensitive pageConfiguration createConfigurationName keyWhenRelationship newButtonLabel

Author:
davidleber

Constructor & Destructor Documentation

ERMD2WEditToOneTypeAhead ( WOContext  context  ) 


Member Function Documentation

WOActionResults addObject (  ) 

Action called when user clicks the Add button

Returns:

NSArray<EOEnterpriseObject> allItems (  ) 

void awake (  ) 

NSArray<EOEnterpriseObject> currentObjects (  ) 

Returns the array of available matching destination entities

Returns:

EOEnterpriseObject currentSelection (  ) 

Returns the currently selected destination entity

Returns:

EODataSource dataSource (  ) 

String destinationEntityName (  ) 

NSArray<EOEnterpriseObject> destinationObjectsWithQualifier ( EOQualifier  qual  ) 

EOEditingContext ec (  )  [private]

EOQualifier extraQualifier (  ) 

String itemDisplayString (  ) 

Returns the display value for the available matching destination entities in the drop down list.

Returns:

String keyWhenRelationship (  ) 

Integer minimumCharacterCount (  ) 

String newButtonClass (  ) 

String newButtonLabel (  ) 

String propertyKey (  ) 

void relatedObjectDidChange ( NSNotification  notif  ) 

Called when an ERMDActionButton changes the related object. Nulls _searchValue which in turn lets it rebuild on the next display

String restrictedChoiceKey (  ) 

Object restrictedChoiceList (  ) 

EOFetchSpecification restrictingFetchSpec (  ) 

String restrictingFetchSpecificationName (  ) 

String searchTemplate (  ) 

String searchTermSelectedFunction (  ) 

String searchTermSelectedFunctionName (  ) 

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:

WOActionResults selectObject (  ) 

Action called when the user makes a selection from the AjaxAutoComplete

Returns:

void setPropertyKey ( String  key  ) 

void setSearchValue ( String  value  ) 

Sets the searchValue

Parameters:
value 

void sleep (  ) 

String sortKey (  ) 

boolean synchronizesVariablesWithBindings (  ) 

Overridden from superclass to turn on component synching, which is the default.

Reimplemented from ERDCustomEditComponent.

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


Member Data Documentation

NSArray<EOEnterpriseObject> _allItems [private]

EOEnterpriseObject _currentSelection [private]

EOQualifier _extraQualifier [private]

Integer _minimumCharacterCount [private]

String _propertyKey [private]

EOFetchSpecification _restrictingFetchSpec [private]

String _searchValue [private]

String _sortKey [private]

String _template [private]

EOEnterpriseObject item

Logger log = Logger.getLogger(ERMD2WEditToOneTypeAhead.class) [static]

logging support

Reimplemented from ERDCustomEditComponent.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:24 2012 for Project Wonder by  doxygen 1.5.8