Initializes a new instance of the {@link geocortex.framework.ui.PresentableCollection} class.
The ObservableCollection object to mirror and paginate for.
The predicate to filter by.
The sorting method to use.
The sorting predicate to use when choosing item positions.
Attaches to an ObservableCollection and begins mirroring it in a paginated, presentable fashion.
Binds a handler to an Observable or to a dojo.connect. Binding to an Observable: ``` this.auto(someObservable, function (newValue) { });
with explicit scope:
this.auto(someObservable, this, function (newValue) { });
Alternately, pass an event name as a string to use dojo.connect:
this.auto(window, "onclick", function () { }); ```
Either an Observable (for observable bindings) or a regular object (if arg1 is a string)
If arg0 is an Observable, a function or scope object. Otherwise, an event name (to use with dojo.connect).
If arg0 is an Observable, a function handler.
Disposes some event handlers and tears down state, resetting the PresentableCollection
Sorts an array using the default native sort implementation and any sorting predicate set.
Goes even farther than cleanUp()
, releasing all resources.
Gets an item from a given position in the underlying collection.
Returns the total number of items in the underlying collection.
Gets a language resource from the Application's resource dictionary, given a key, and optional locale.
Returns null
if the resource does not exist.
The locale of the resource to fetch. Defaults to the current application locale.
Uses a simple binary search to find the sorted position of an item.
Increments the page number.
Override or attach to provide custom clean-up behaviour.
Decrements the page number.
Sorts the entire underlying collection based on the current sorting predicate.
Tracks a subscription to an {@link geocortex.framework.commands.Command}, disposing it when this object is disposed with the destroy method.
Tracks a subscription to an {@link geocortex.framework.events.Event}, disposing it when this object is disposed with the destroy method.
Unsorts the collection and rebinds.
Classifies an intersection type based on two pairs of indices.
is inclusive
is exclusive
is inclusive
is inclusive (confusing!)
PresentableCollection implements paging at the collection level and provides an easy way for interface components to manage common collection-related concerns.