Class: ArrayDataSet

Kekule.Widget. ArrayDataSet

new ArrayDataSet(data)

A simple data set, stored all data in an internal array.
Parameters:
Name Type Description
data Array
Properties:
Name Type Description
data Array
Source:

Extends

Methods

clearCache()

Remove all data in cache.
Inherited From:
Source:

fetch(options)

Fetch data in a range.
Parameters:
Name Type Description
options Hash Options may include the following fields: { fromIndex: from index of data, count: count of data item to retrieve, 0 means retrieve all data, ignoreCache: Force to not use cache even if enableCache property is true, timeout: milliseconds, callback: callback function called when data are successful retrieved, callback(dataArray). errCallback: callback when error occurs callback(err) timeOutCallback: callback when timeout. If this callback is not set, errCallback will be called instead. }
Inherited From:
Source:

getFirstIndex() → {Int}

Returns the first index of data (usually 0). Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Int

getLastIndex() → {Int}

Returns the first index of data (usually total data count - 1). Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Int

getTotalCount() → {Int}

Returns total data item length. Returns -1 needs unknown.
Inherited From:
Source:
Returns:
Type
Int

Events

dataChange

Invoked when data in dataset is changed event param of it has field: {totalCount}
Inherited From:
Source:

totalCountChange

Invoked when record count in dataset is changed event param of it has field: {totalCount}
Inherited From:
Source:

Kekule.Widget. ArrayDataSet

Methods

clearCache()

Remove all data in cache.
Inherited From:
Source:

fetch(options)

Fetch data in a range.
Parameters:
Name Type Description
options Hash Options may include the following fields: { fromIndex: from index of data, count: count of data item to retrieve, 0 means retrieve all data, ignoreCache: Force to not use cache even if enableCache property is true, timeout: milliseconds, callback: callback function called when data are successful retrieved, callback(dataArray). errCallback: callback when error occurs callback(err) timeOutCallback: callback when timeout. If this callback is not set, errCallback will be called instead. }
Inherited From:
Source:

getFirstIndex() → {Int}

Returns the first index of data (usually 0). Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Int

getLastIndex() → {Int}

Returns the first index of data (usually total data count - 1). Descendants may override this method.
Inherited From:
Source:
Returns:
Type
Int

getTotalCount() → {Int}

Returns total data item length. Returns -1 needs unknown.
Inherited From:
Source:
Returns:
Type
Int

Events

dataChange

Invoked when data in dataset is changed event param of it has field: {totalCount}
Inherited From:
Source:

totalCountChange

Invoked when record count in dataset is changed event param of it has field: {totalCount}
Inherited From:
Source: