Class: SortDescriptor

domain~ SortDescriptor

A description of a sort applied to a property of a collection.


new SortDescriptor(key [, descending])

Constructor.

Parameters:
Name Type Argument Description
key string

the property to sort on

descending boolean <optional>

true to sort in descending order, false for ascending

Members


descending

Get the sorting direction.


key

Get the sort property name.

Methods


toUriEncoding( [index] [, propertyName])

Get this object as a standard URI encoded (query parameters) string value.

If index is provided and non-negative, then the query parameters will be encoded as an array property named sorts. Otherwise just bare key and descending properties will be used. The descending property is only added if it is true.

Parameters:
Name Type Argument Default Description
index number <optional>

an optional array property index

propertyName string <optional>
sorts

an optional array property name, only used if index is also provided

Returns:

the URI encoded string

Type
string