PATH
Documentation > WebObjects 4.5 >
WebObjects Reference
Adopted by:
WODisplayGroup delegate objects
Declared in: WebObjects/WODisplayGroup.h
Protocol Description
WODisplayGroup offers a number of methods for its delegate
to implement; if the delegate does implement them, the WODisplayGroup
instances invoke them as appropriate. There are methods that inform
the delegate that the EODisplayGroup has fetched, created an object
(or failed to create one), inserted or deleted an object, changed
the selection, or set a value for a property. There are also methods that
request permission from the delegate to perform most of these same
actions. The delegate can return YES to permit the action or NO to
deny it. See each method's description for more information.
Instance Methods
- (void)displayGroup:(WODisplayGroup
*)aDisplayGroup
createObjectFailedForDataSource:(id)aDataSource
Invoked from insertObjectAtIndex: to
inform the delegate that aDisplayGroup has
failed to create a new object for aDataSource.
If the delegate doesn't implement this method, the WODisplayGroup
fails silently.
- (void)displayGroupDidChangeDataSource:(WODisplayGroup
*)aDisplayGroup
Informs the delegate that aDisplayGroup's
EODataSource (defined in the EOControl framework) has changed.
- (void)displayGroupDidChangeSelectedObjects:(WODisplayGroup
*)aDisplayGroup
Informs the delegate that aDisplayGroup's
selected objects have changed, regardless of whether the selection
indexes have changed.
- (void)displayGroupDidChangeSelection:(WODisplayGroup
*)aDisplayGroup
Informs the delegate that aDisplayGroup's
selection has changed.
- (void)displayGroup:(WODisplayGroup
*)aDisplayGroup
didDeleteObject:(id)anObject
Informs the delegate that aDisplayGroup has
deleted anObject.
- (void)displayGroup:(WODisplayGroup
*)aDisplayGroup
didFetchObjects:(NSArray *)objects
Informs the delegate that aDisplayGroup has
fetched objects.
- (void)displayGroup:(WODisplayGroup
*)aDisplayGroup
didInsertObject:(id)anObject
Informs the delegate that aDisplayGroup has
inserted anObject.
- (void)displayGroup:(WODisplayGroup
*)aDisplayGroup
didSetValue:(id)value
forObject:(id)anObject
key:(NSString *)key
Informs the delegate that aDisplayGroup has
altered a property value of anObject. key identifies
the property, and value is its new
value.
- (NSArray *)displayGroup:(WODisplayGroup
*)aDisplayGroup
displayArrayForObjects:(NSArray
*)objects
Invoked from updateDisplayedObjects,
this method allows the delegate to filter and sort aDisplayGroup's
array of objects to limit which ones get displayed. objects contains
all of aDisplayGroup's objects. The delegate should filter any
objects that shouldn't be shown and sort the remainder, returning
a new array containing this group of objects. You can use the NSArray
methods filteredArrayUsingQualifier: and sortedArrayUsingKeyOrderingArray: to
create the new array.
If the delegate doesn't implement this method, the WODisplayGroup
uses its own qualifier and sort ordering to update the displayed
objects array.
See Also:
- displayedObjects, - qualifier, - sortOrderings
- (BOOL)displayGroup:(WODisplayGroup
*)aDisplayGroup
shouldChangeSelectionToIndexes:(NSArray
*)newIndexes
Allows the delegate to prevent a change in selection
by aDisplayGroup. newIndexes is
the proposed new selection. If the delegate returns YES, the selection
changes; if the delegate returns NO, the selection remains as it
is.
- (BOOL)displayGroup:(WODisplayGroup
*)aDisplayGroup
shouldDeleteObject:(id)anObject
Allows the delegate to prevent aDisplayGroup from
deleting anObject. If the delegate
returns YES, anObject is deleted;
if the delegate returns NO, the deletion is abandoned.
- (BOOL)displayGroupShouldFetch:(WODisplayGroup
*)aDisplayGroup
Allows the delegate to prevent aDisplayGroup from
fetching. If the delegate returns YES, aDisplayGroup performs
the fetch; if the delegate returns NO, aDisplayGroup abandons
the fetch.
- (BOOL)displayGroup:(WODisplayGroup
*)aDisplayGroup
shouldInsertObject:(id)anObject
atIndex:(unsigned int)anIndex
Allows the delegate to prevent redisplay from inserting anObject at anIndex.
If the delegate returns YES, anObject is
inserted; if the delegate returns NO, the insertion is abandoned.
- (BOOL)displayGroup:(WODisplayGroup
*)aDisplayGroup
shouldRedisplayForEditingContextChangeNotification:(NSNotification
*)aNotification
Invoked whenever aDisplayGroup receives
an EOObjectsChangedInEditingContextNotification, this method allows
the delegate to suppress redisplay based on the nature of the change
that has occurred. If the delegate returns YES, aDisplayGroup redisplays;
if it returns NO, aDisplayGroup doesn't.
See Also:
- redisplay
- (BOOL)displayGroup:(WODisplayGroup
*)aDisplayGroup
shouldRefetchForInvalidatedAllObjectsNotification:(NSNotification
*)aNotification
Invoked whenever aDisplayGroup receives
an EOInvalidatedAllObjectsInStoreNotification, this method allows
the delegate to suppress the refetching of the invalidated objects.
If the delegate returns YES, aDisplayGroup immediately
fetches its objects. If the delegate returns NO, aDisplayGroup doesn't immediately
fetch, instead delaying until absolutely necessary.
See Also:
- redisplay