Base implementation of a paged collection that supports ItemPendingError.
The collection holds two complete pages of data.
Subclassed have to implement a getResult method that will retrieve a range of elements.
public var beforeFindCall:Function = null
protected var _clientMax:int
protected var _clientMaxSet:Boolean = false
protected var _context:BaseContext = null
public var dispatchReplaceOnResult:Boolean
public var dispatchResetOnInit:Boolean
elementClass:Class [write-only]
This property can be used as the source for data binding.
Implementation
public function set elementClass(value:Class):void
protected var _initializing:Boolean = false
length:int [read-only]
Get total number of elements
This property can be used as the source for data binding.
Implementation
public function get length():int
list:IList [write-only]
This property can be used as the source for data binding.
Implementation
public function set list(value:IList):void
maxResults:int [write-only]
Set the page size. The collection will store in memory twice this page size, and each server call
will return at most the page size.
This property can be used as the source for data binding.
Implementation
public function set maxResults(value:int):void
public var multipleSort:Boolean = true
sort:Sort [read-write]
This property can be used as the source for data binding.
Implementation
public function get sort():Sort
public function set sort(value:Sort):void
public var throwIPEDuringResponders:Boolean = false
public var triggerRefreshOnIPEWithoutResponder:Boolean = false
public var uidProperty:String = "uid"
public function PagedCollection()
public function clear():void
Clear collection content
public override function dispatchEvent(event:Event):BooleanParameters
Returns
protected function find(first:int, last:int, merge:Boolean = false):void
Abstract method: trigger a results query for the current filter
Parameters
| first:int — : index of first required result
|
| |
| last:int — : index of last required result
|
| |
| merge:Boolean (default = false) — : should merge the result with the current wrapped list
|
public function fullRefresh():Boolean
Force refresh of collection when filter/sort have been changed
Returns
public override function getItemAt(index:int, prefetch:int = 0):Object
Override of getItemAt with ItemPendingError management
Parameters
| index:int — index of requested item
|
| |
| prefetch:int (default = 0) — not used
|
Returns
| Object — object at specified index
|
public override function getItemIndex(obj:Object):int
Override of getItemIndex
Parameters
| obj:Object — searched object
|
Returns
| int — index of object in collection
|
protected function getResult(event:TideResultEvent, first:int, max:int):Object
Build a result object from the result event
Parameters
| event:TideResultEvent — the result event
|
| |
| first:int — first index requested
|
| |
| max:int — max elements requested
|
Returns
| Object — an object containing data from the collection
resultList : the retrieved data
resultCount : the total count of elements (non paged)
firstResult : the index of the first retrieved element
maxResults : the maximum count of retrieved elements
|
protected function itemUpdateHandler(event:PropertyChangeEvent):voidParameters
| event:PropertyChangeEvent |
public function meta_init(componentName:String, context:BaseContext):voidParameters
public override function refresh():Boolean
Refresh collection with new filter/sort parameters
Returns
protected function startTrackUpdates(item:Object):voidParameters
protected function stopTrackUpdates(item:Object):voidParameters
public static const COLLECTION_PAGE_CHANGE:String = "collectionPageChange"
public static const FAULT:String = "fault"
public static const RESULT:String = "result"