|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The WODisplayGroup delegate offers a number of methods, and WODisplayGroup invokes them as appropriate.
Besides displayGroupDisplayArrayForObjects
, there are methods that inform the delegate that the WODisplayGroup has fetched objects from its dataSource
,
created an object (or failed to create one), inserted or deleted an object within its EOEditingContext, changed the selection, or set a value for a property of one of its
objects.
There are also methods that request permission from the delegate to perform most of these same actions.
Such methods can return true
to permit the action or false
to deny it.
If the WODisplayGroup has a delegate object, the delegate object may not implement this interface (in order to avoid the need to implement all of the delegate methods). The WODisplayGroup will only invoke delegate methods if it has a delegate and the methods in question are implemented by the delegate.
EODataSource
,
EOEditingContext
,
WODisplayGroup.delegate()
,
WODisplayGroup.setDelegate(java.lang.Object)
,
displayGroupDisplayArrayForObjects(com.webobjects.appserver.WODisplayGroup, com.webobjects.foundation.NSArray)
Method Summary | |
void |
displayGroupCreateObjectFailedForDataSource(WODisplayGroup group,
EODataSource dataSource)
Informs the delegate that group has failed to create a new object for dataSource . |
void |
displayGroupDidChangeDataSource(WODisplayGroup group)
Informs the delegate that group 's dataSource has changed. |
void |
displayGroupDidChangeSelectedObjects(WODisplayGroup group)
Informs the delegate that group 's selected objects have changed, regardless of whether the selection indexes have changed. |
void |
displayGroupDidChangeSelection(WODisplayGroup group)
Informs the delegate that group 's selection has changed. |
void |
displayGroupDidDeleteObject(WODisplayGroup group,
Object eo)
Informs the delegate that group has deleted eo . |
void |
displayGroupDidFetchObjects(WODisplayGroup group,
NSArray objects)
Informs the delegate that group has fetched objects from its dataSource . |
void |
displayGroupDidInsertObject(WODisplayGroup group,
Object eo)
Informs the delegate that group has inserted eo . |
NSArray |
displayGroupDisplayArrayForObjects(WODisplayGroup group,
NSArray objects)
Allows the delegate to filter and sort group 's array of objects to limit which ones get displayed. |
boolean |
displayGroupShouldChangeSelectionToIndexes(WODisplayGroup group,
NSArray newIndexes)
Allows the delegate to prevent a change in selection by group . |
boolean |
displayGroupShouldDeleteObject(WODisplayGroup group,
Object eo)
Allows the delegate to prevent group from deleting eo . |
boolean |
displayGroupShouldDisplayAlert(WODisplayGroup group,
String title,
String message)
Deprecated. No longer important for WebObjects applications. No user code should depend upon this, and any references to this method may be eliminated freely. |
boolean |
displayGroupShouldFetch(WODisplayGroup group)
Allows the delegate to prevent group from fetching. |
boolean |
displayGroupShouldInsertObject(WODisplayGroup group,
Object eo,
int index)
Allows the delegate to prevent group from inserting eo at index . |
boolean |
displayGroupShouldRefetchForInvalidatedAllObjects(WODisplayGroup group,
NSNotification notification)
Allows the delegate to suppress immediate refetching when the WODisplayGroup's objects have been invalidated. |
Method Detail |
public void displayGroupCreateObjectFailedForDataSource(WODisplayGroup group, EODataSource dataSource)
group
has failed to create a new object for dataSource
.
Invoked from insertNewObjectAtIndex
.If the delegate doesn't implement this method, WODisplayGroup fails silently.
group
- display group for which this delegate will act.
Should never be null
.dataSource
- data source for which the failure occurred.
Should never be null
.WODisplayGroup.insertNewObjectAtIndex(int)
public void displayGroupDidChangeDataSource(WODisplayGroup group)
group
's dataSource
has changed.group
- display group for which this delegate will act.
Should never be null
.WODisplayGroup.dataSource()
public void displayGroupDidChangeSelectedObjects(WODisplayGroup group)
group
's selected objects have changed, regardless of whether the selection indexes have changed.group
- display group for which this delegate will act.
Should never be null
.public void displayGroupDidChangeSelection(WODisplayGroup group)
group
's selection has changed.group
- display group for which this delegate will act.
Should never be null
.public void displayGroupDidDeleteObject(WODisplayGroup group, Object eo)
group
has deleted eo
.group
- display group for which this delegate will act.
Should never be null
.eo
- object deleted by group
.
Should never be null
.public void displayGroupDidFetchObjects(WODisplayGroup group, NSArray objects)
group
has fetched objects
from its dataSource
.group
- display group for which this delegate will act.
Should never be null
.objects
- objects fetched by group
.
Should never be null
.WODisplayGroup.dataSource()
public void displayGroupDidInsertObject(WODisplayGroup group, Object eo)
group
has inserted eo
.group
- display group for which this delegate will act.
Should never be null
.eo
- object inserted by group
.
Should never be null
.public NSArray displayGroupDisplayArrayForObjects(WODisplayGroup group, NSArray objects)
group
's array of objects
to limit which ones get displayed.
Invoked from updateDisplayedObjects
.
The delegate should filter any objects that shouldn't be shown and sort the remainder, returning a new array containing this grouping of objects
.
You can use EOQualifier's filteredArrayWithQualifier
and EOSortOrdering's sortedArrayUsingKeyOrderArray
methods to create the new array.
If the delegate doesn't implement this method, WODisplayGroup uses its own qualifier and sort ordering to update the displayedObjects
array.
group
- display group for which this delegate will act.
Should never be null
.objects
- all of group
's objects.
Should never be null
.NSArray.EmptyArray
.EOQualifier.filteredArrayWithQualifier(com.webobjects.foundation.NSArray, com.webobjects.eocontrol.EOQualifier)
,
EOSortOrdering.sortedArrayUsingKeyOrderArray(com.webobjects.foundation.NSArray, com.webobjects.foundation.NSArray)
,
NSArray.EmptyArray
,
WODisplayGroup.displayedObjects()
,
WODisplayGroup.qualifier()
,
WODisplayGroup.sortOrderings()
,
WODisplayGroup.updateDisplayedObjects()
public boolean displayGroupShouldChangeSelectionToIndexes(WODisplayGroup group, NSArray newIndexes)
group
.group
- display group for which this delegate will act.
Should never be null
.newIndexes
- proposed new selectiontrue
when group
should change its selection to newIndexes
,
false
otherwisepublic boolean displayGroupShouldDeleteObject(WODisplayGroup group, Object eo)
group
from deleting eo
.group
- display group for which this delegate will act.
Should never be null
.eo
- object that will be deleted by group
.
Should never be null
.true
when group
should delete eo
,
false
otherwisepublic boolean displayGroupShouldDisplayAlert(WODisplayGroup group, String title, String message)
group
or its EOEditingContext.
If this delegate method returns true
, an alert is displayed; if the delegate returns false
, no alert is displayed.
The two String parameters specify the alert title and alert description, respectively.
Such alerts are displayed using Foundation's NSLog class.
group
- display group for which this delegate will act.
Should never be null
.title
- alert title that might be displayedmessage
- alert description that might be displayedtrue
when group
should display an alert,
false
otherwiseEOEditingContext
,
NSLog
public boolean displayGroupShouldFetch(WODisplayGroup group)
group
from fetching.group
- display group for which this delegate will act.
Should never be null
.true
when group
should perform the fetch from its dataSource
,
false
otherwiseWODisplayGroup.dataSource()
public boolean displayGroupShouldInsertObject(WODisplayGroup group, Object eo, int index)
group
from inserting eo
at index
.group
- display group for which this delegate will act.
Should never be null
.eo
- object to be inserted at index
.
Should never be null
.index
- index at which to insert object
.true
when group
should insert eo
,
false
otherwiseWODisplayGroup.insertObjectAtIndex(java.lang.Object, int)
public boolean displayGroupShouldRefetchForInvalidatedAllObjects(WODisplayGroup group, NSNotification notification)
group
receives an EOObjectStore.InvalidatedAllObjectsInStoreNotification
.group
- display group for which this delegate will act.
Should never be null
.notification
- notification provided for the associated object's userInfo
.
Should never be null
.true
when group
should immediately refetch from its dataSource
,
false
otherwiseEOObjectStore.InvalidatedAllObjectsInStoreNotification
,
NSNotification
,
WODisplayGroup.dataSource()
,
WODisplayGroup.redisplay()
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |