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
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
DisplayGroupWillFetchNotification
_CLASS, NullValue
_CLASS
_CLASS
_CLASS
_CLASS
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(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. |
EOQualifier |
qualifierForKey(String key)
Will return the qualifier set by "setQualifierForKey()" if it exists.
|
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(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(EOQualifier qualifier) |
void |
setQualifierForKey(EOQualifier qualifier,
String key) |
void |
setSelectedObjects(NSArray objects) |
boolean |
setSelectionIndexes(NSArray nsarray) |
void |
setSortOrderings(NSArray<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<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(EOKeyValueUnarchiver unarchiver)
unarchiver
- the unarchiver to construct this display group withpublic void setQualifierForKey(EOQualifier qualifier, String key)
public EOQualifier qualifierForKey(String key)
key
- public EOQualifier qualifierFromQueryValues()
qualifierFromQueryValues
in class WODisplayGroup
public Object fetch()
fetch
in class WODisplayGroup
null
to force the page to reloadpublic void setQualifier(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(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<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<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 – 2024 Project Wonder.