T
- data type of the displaygroup's objectspublic class ERXDisplayGroup<T> extends WODisplayGroup
WODisplayGroup
setSelectedObjects(NSArray)
only matching objects in the displayed objects will be selected and the events displayGroupShouldChangeSelectionToIndexes,
displayGroupDidChangeSelectedObjects and displayGroupDidChangeSelection will be triggered.
setSelectedObjects(NSArray)
you won't
get related events as with a datasource. Also the selection is not matched against the displayed objects but set directly.WODisplayGroup.Delegate
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.DefaultImplementation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.Utility, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support
DisplayGroupWillFetchNotification
Constructor and Description |
---|
ERXDisplayGroup() |
Modifier and Type | Method and Description |
---|---|
boolean |
addToSelection(NSArray<T> objects)
Extends the current selection by the given objects.
|
boolean |
addToSelection(T object)
Extends the current selection by the given object.
|
NSArray<T> |
allObjects() |
NSArray<String> |
allQualifierOperators() |
void |
clearExtraQualifiers() |
static Object |
decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver unarchiver)
Decodes an ERXDisplayGroup from the given unarchiver.
|
NSArray<T> |
displayedObjects() |
Object |
displayNextBatch()
Overridden to preserve the current selection.
|
Object |
displayPreviousBatch()
Overridden to preserve the current selection.
|
Object |
fetch()
Overridden to localize the fetch specification if needed.
|
NSArray<T> |
filteredObjects()
Returns all objects, filtered by the qualifier().
|
int |
indexOfFirstDisplayedObject()
Overridden to return correct result when no objects are displayed
|
int |
indexOfLastDisplayedObject()
Overridden to return correct index if the number of filtered objects
is not a multiple of
numberOfObjectsPerBatch and we are
on the last batch index. |
com.webobjects.eocontrol.EOQualifier |
qualifierForKey(String key)
Will return the qualifier set by "setQualifierForKey()" if it exists.
|
com.webobjects.eocontrol.EOQualifier |
qualifierFromQueryValues()
Overridden to support extra qualifiers.
|
boolean |
removeFromSelection(NSArray<T> objects)
Removes the given objects from the current selection.
|
boolean |
removeFromSelection(T object)
Removes the given object from the current selection.
|
T |
selectedObject() |
NSArray<T> |
selectedObjects() |
Object |
selectFilteredObjects()
Selects the visible objects.
|
void |
setDataSource(com.webobjects.eocontrol.EODataSource ds)
Overridden to clear out the sort ordering if it is no longer applicable.
|
void |
setNumberOfObjectsPerBatch(int count)
Overridden to preserve the current selection.
|
void |
setQualifier(com.webobjects.eocontrol.EOQualifier qualifier) |
void |
setQualifierForKey(com.webobjects.eocontrol.EOQualifier qualifier,
String key) |
void |
setSelectedObjects(NSArray objects) |
boolean |
setSelectionIndexes(NSArray nsarray) |
void |
setSortOrderings(NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings)
Overridden to log a message when more than one sort order exists.
|
NSArray<T> |
sortedObjects()
Returns allObjects(), first filtered by the qualifier(), then sorted by the sortOrderings().
|
NSArray<com.webobjects.eocontrol.EOSortOrdering> |
sortOrderings() |
_beginObserverNotification, _deleteObject, _insertObjectAtIndex, _lastObserverNotified, awakeFromKeyValueUnarchiver, batchCount, clearSelection, currentBatchIndex, dataSource, defaultStringMatchFormat, defaultStringMatchOperator, delegate, delete, deleteObjectAtIndex, deleteSelection, detailKey, displayBatchContainingSelectedObject, dispose, editingContextPresentErrorMessage, encodeWithCoder, encodeWithKeyValueArchiver, endEditing, fetchesOnLoad, finishInitialization, globalDefaultForValidatesChangesImmediately, globalDefaultStringMatchFormat, globalDefaultStringMatchOperator, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasDetailDataSource, hasMultipleBatches, initWithCoder, inQueryMode, insert, insertedObjectDefaultValues, insertNewObjectAtIndex, insertObjectAtIndex, localKeys, masterObject, numberOfObjectsPerBatch, objectsChangedInEditingContext, objectsInvalidatedInEditingContext, qualifier, qualifyDataSource, qualifyDisplayGroup, queryBindings, queryMatch, queryMax, queryMin, queryOperator, redisplay, relationalQualifierOperators, selectionIndexes, selectNext, selectObject, selectObjectsIdenticalTo, selectObjectsIdenticalToSelectFirstOnNoMatch, selectPrevious, selectsFirstObjectAfterFetch, setCurrentBatchIndex, setDefaultStringMatchFormat, setDefaultStringMatchOperator, setDelegate, setDetailKey, setFetchesOnLoad, setGlobalDefaultForValidatesChangesImmediately, setGlobalDefaultStringMatchFormat, setGlobalDefaultStringMatchOperator, setInQueryMode, setInsertedObjectDefaultValues, setLocalKeys, setMasterObject, setObjectArray, setSelectedObject, setSelectsFirstObjectAfterFetch, setValidatesChangesImmediately, stringQualifierOperators, takeValueForKey, toString, unableToSetNullForKey, undoManager, updateDisplayedObjects, validatesChangesImmediately, valueForKey, willChange
public static Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver unarchiver)
unarchiver
- the unarchiver to construct this display group withpublic void setQualifierForKey(com.webobjects.eocontrol.EOQualifier qualifier, String key)
public com.webobjects.eocontrol.EOQualifier qualifierForKey(String key)
key
- public com.webobjects.eocontrol.EOQualifier qualifierFromQueryValues()
qualifierFromQueryValues
in class WODisplayGroup
public Object fetch()
fetch
in class WODisplayGroup
null
to force the page to reloadpublic void setQualifier(com.webobjects.eocontrol.EOQualifier qualifier)
setQualifier
in class WODisplayGroup
public NSArray<T> filteredObjects()
public NSArray<T> sortedObjects()
public NSArray<T> selectedObjects()
selectedObjects
in class WODisplayGroup
public void setSelectedObjects(NSArray objects)
setSelectedObjects
in class WODisplayGroup
public boolean setSelectionIndexes(NSArray nsarray)
setSelectionIndexes
in class WODisplayGroup
public boolean addToSelection(T object)
object
- object to add to the selectiontrue
if the object was added or false
otherwisepublic boolean addToSelection(NSArray<T> objects)
objects
- objects to add to the selectiontrue
if at least one object was added or false
otherwisepublic boolean removeFromSelection(T object)
object
- object to remove from the selectiontrue
if the object was removed or false
otherwisepublic boolean removeFromSelection(NSArray<T> objects)
objects
- objects to remove from the selectiontrue
if at least one object was removed or false
otherwisepublic void setNumberOfObjectsPerBatch(int count)
setNumberOfObjectsPerBatch
in class WODisplayGroup
count
- the proposed number of objects the WODisplayGroup should display at a timepublic void setDataSource(com.webobjects.eocontrol.EODataSource ds)
setDataSource
in class WODisplayGroup
ds
- the proposed EODataSourcepublic Object displayNextBatch()
displayNextBatch
in class WODisplayGroup
null
to force the page to reloadpublic Object displayPreviousBatch()
displayPreviousBatch
in class WODisplayGroup
null
to force the page to reloadpublic Object selectFilteredObjects()
null
to force the page to reloadpublic void setSortOrderings(NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings)
setSortOrderings
in class WODisplayGroup
sortOrderings
- the proposed EOSortOrdering objectspublic void clearExtraQualifiers()
public NSArray<T> allObjects()
allObjects
in class WODisplayGroup
public NSArray<String> allQualifierOperators()
allQualifierOperators
in class WODisplayGroup
public NSArray<T> displayedObjects()
displayedObjects
in class WODisplayGroup
public T selectedObject()
selectedObject
in class WODisplayGroup
public NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings()
sortOrderings
in class WODisplayGroup
public int indexOfFirstDisplayedObject()
indexOfFirstDisplayedObject
in class WODisplayGroup
public int indexOfLastDisplayedObject()
numberOfObjectsPerBatch
and we are
on the last batch index. The superclass incorrectly uses allObjects
instead of displayedObjects to determine the index value.indexOfLastDisplayedObject
in class WODisplayGroup
Copyright © 2002 – 2020 Project Wonder.