WebObjects 5.2

com.webobjects.eointerface
Class EODetailSelectionAssociation

java.lang.Object
  |
  +--com.webobjects.eocontrol.EODelayedObserver
        |
        +--com.webobjects.eointerface.EOAssociation
              |
              +--com.webobjects.eointerface.EODetailSelectionAssociation
All Implemented Interfaces:
EOObserving, NSDisposable

public class EODetailSelectionAssociation
extends EOAssociation

An EODetailSelectionAssociation binds two EODisplayGroups together through a relationship, so that the destination display group acts as an editor for that relationship.

The destination display group shows all possible values for the relationship and indicates the actual members of the relationship by selecting them. The user can change the objects included in the relationship of the source by selecting and deselecting them in the destination.

EODetailSelectionAssociation is a useful alternative to EOMasterDetailAssociation and EOMasterPeerAssociation when it's more important to add and remove objects from a relationship than it is to edit the attributes of those objects.

Usable with:
EOSisplayGroup

Aspects:
selectedObjectsA relationship from objects in the source EODisplayGroup.

Example:

Suppose that an employee can be assigned any number of projects. Your application displays employees in one table view and projects in another. When an employee is selected in the first table view, the employee's assigned projects are selected in the other. To change the employee's project assignments, a user changes the selection in the project table view: to add a project to the set, the user selects it, and to remove a project from the set, the user deselects it. To do this, in Interface Builder control-drag a connection from the Projects display group to the Employee display group. Choose EODetailSelectionAssociation in the Connections inspector, and bind the selectedObjects aspect to the "projects" key.


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
EODetailSelectionAssociation(Object object)
          Creates a new EODetailSelectionAssociation to monitor and update the objects in object, an EODisplayGroup.
 
Method Summary
 boolean isUsableWithObject(Object object)
          Returns true if object is an instance of EODisplayGroup.
 String primaryAspect()
          Returns the primary aspect this association gets bound to.
 void subjectChanged()
          See the subjectChanged method description in the superclass EOAssociation.
 
Methods inherited from class com.webobjects.eointerface.EOAssociation
aspects, aspectSignatures, associationClassesForObject, bindAspect, breakConnection, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, dispose, endEditing, establishConnection, isConnected, isEnabled, isEnabledAtIndex, isExplicitlyDisabled, object, objectKeysTaken, priority, registerAssociationClass, setExplicitlyDisabled, setObject, 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

EODetailSelectionAssociation

public EODetailSelectionAssociation(Object object)
Creates a new EODetailSelectionAssociation to monitor and update the objects in object, an EODisplayGroup. 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 - EODisplayGroup for this association to monitor and update
See Also:
EOAssociation.bindAspect(java.lang.String, com.webobjects.eointerface.EODisplayGroup, java.lang.String), EOAssociation.establishConnection()
Method Detail

isUsableWithObject

public boolean isUsableWithObject(Object object)
Returns true if object is an instance of EODisplayGroup.
Overrides:
isUsableWithObject in class EOAssociation
Parameters:
object - this method should verify that object is usable with the association
Returns:
true if object is an instance of EODisplayGroup, false otherwise
See Also:
EOAssociation.isUsableWithObject(java.lang.Object)

primaryAspect

public String primaryAspect()
Returns the primary aspect this association gets bound to.
Overrides:
primaryAspect in class EOAssociation
Returns:
EOAssociaion.SelectedObjectAspect

subjectChanged

public void subjectChanged()
See the subjectChanged method description in the superclass EOAssociation.
Overrides:
subjectChanged in class EOAssociation
See Also:
EOAssociation.subjectChanged()

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.