WebObjects 5.2.3

com.webobjects.eointerface
Class EOPickTextAssociation

java.lang.Object
  extended bycom.webobjects.eocontrol.EODelayedObserver
      extended bycom.webobjects.eointerface.EOAssociation
          extended bycom.webobjects.eointerface.EOWidgetAssociation
              extended bycom.webobjects.eointerface.EOValueAssociation
                  extended bycom.webobjects.eointerface.EOPickTextAssociation
All Implemented Interfaces:
EOObserving, NSDisposable

public class EOPickTextAssociation
extends EOValueAssociation

An EOPickTextAssociation takes the value of its display object's plugin, a EOValueAssociation.ValuePlugin or subclass, and uses it's string value to form a qualifier with up to three LIKE operators, each compared to a different key of the EODisplayGroup. (Keys are specified in MatchKey1Aspect, MatchKey2Aspect, MatchKey3Aspect). It thereby acts as a filter on the display group. This allows the user to perform a similarity search based on whole or partial values.

Aspects:

EOAssociation.MatchKey1Aspect,

EOAssociation.MatchKey2Aspect,

EOAssociation.MatchKey3Aspect

Example

Make an EOPickTextAssociation between an NSTextField and an EODisplayGroup of People objects. Bind the matchKey1 and matchKey2 aspects to the "lastName" and "firstName" keys. If the user types "Bi" in the field, the EOPickTextAssociation applies the following qualifier to the EODisplayGroup:

(lastName like "*Bi*") OR (firstName like "*Bi*")

which matches names like "Bill Smith" and "Joe Biggs". The list of objects displayed in the display group is restricted to those that match the qualifier.

See Also:
EOAssociation

Nested Class Summary
 
Nested classes inherited from class com.webobjects.eointerface.EOValueAssociation
EOValueAssociation.ValuePlugin
 
Nested classes inherited from class com.webobjects.eointerface.EOWidgetAssociation
EOWidgetAssociation.WidgetPlugin
 
Field Summary
 
Fields inherited from class com.webobjects.eointerface.EOAssociation
ActionAspect, ArgumentAspect, AttributeAspectSignature, AttributeToManyAspectSignature, AttributeToOneAspectSignature, AttributeToOneToManyAspectSignature, BackgroundColorAspect, BoldAspect, ChildrenAspect, DestinationAspect, EnabledAspect, ExpandedIconAspect, IconAspect, IgnoreValue, IsLeafAspect, ItalicAspect, MatchKey1Aspect, MatchKey2Aspect, MatchKey3Aspect, NullAspectSignature, ParentAspect, RootAspect, SelectedIndexAspect, SelectedObjectAspect, SelectedTitleAspect, SetValue, SourceAspect, TextColorAspect, TitlesAspect, ToManyAspectSignature, ToOneAspectSignature, ToOneToManyAspectSignature, UnsetValue, URLAspect, ValueAspect
 
Fields inherited from class com.webobjects.eocontrol.EODelayedObserver
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird
 
Constructor Summary
EOPickTextAssociation(Object object)
          Creates a new EOPickTextAssociation to monitor and update the row values of a display group according to the text widget 'object', which supplies a text (String) value.
 
Method Summary
protected  String displayValueAspect()
          This method returns null since the corresponding text widget is not used to display values, but to filter rows in a display group.
 String primaryAspect()
          This method returns this association's primary aspect, which is EOAssociation.MatchKey1Aspect.
 
Methods inherited from class com.webobjects.eointerface.EOValueAssociation
bindAspect, displayValueFromURL, endEditing, subjectChanged, widgetDidBeginEditing, widgetDidChange, widgetDidEndEditing, widgetPluginClass
 
Methods inherited from class com.webobjects.eointerface.EOWidgetAssociation
canSupportValueFormatter, defaultPrefersContinuousChangeNotification, dispose, isUsableWithObject, objectKeysTaken, prefersContinuousChangeNotification, setDefaultPrefersContinuousChangeNotification, setObject, setPrefersContinuousChangeNotification, setValueFormatter, valueFormatter, widgetPlugin
 
Methods inherited from class com.webobjects.eointerface.EOAssociation
aspects, aspectSignatures, associationClassesForObject, breakConnection, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, establishConnection, isConnected, isEnabled, isEnabledAtIndex, isExplicitlyDisabled, object, priority, registerAssociationClass, setExplicitlyDisabled, setValueForAspect, setValueForAspectAtIndex, shouldEndEditing, shouldEndEditingAtIndex, valueForAspect, valueForAspectAtIndex
 
Methods inherited from class com.webobjects.eocontrol.EODelayedObserver
discardPendingNotification, objectWillChange, observerQueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOPickTextAssociation

public EOPickTextAssociation(Object object)
Creates a new EOPickTextAssociation to monitor and update the row values of a display group according to the text widget 'object', which supplies a text (String) value. You normally set up associations with Interface Builder, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections.

Parameters:
object - the text widget which supplies the string value used as a filter on the display group
Method Detail

displayValueAspect

protected String displayValueAspect()
This method returns null since the corresponding text widget is not used to display values, but to filter rows in a display group.

Overrides:
displayValueAspect in class EOValueAssociation
Returns:
always null

primaryAspect

public String primaryAspect()
This method returns this association's primary aspect, which is EOAssociation.MatchKey1Aspect.

Overrides:
primaryAspect in class EOValueAssociation
Returns:
the name of the primary aspect (EOAssociation.MatchKey1Aspect)

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.