Caplin Trader 4.7.1

Class: module:caplin/grid/DataProviderRowModel

module:caplin/grid/DataProviderRowModel

The DataProviderRowModel is the default implementation of GridRowModel, and attempts to perform all the generic tasks that a GridRowModel can provide, but delegates all the implementation specific jobs of module:caplin/grid/GridRowModel to the GridDataProvider it is associated with.

The DataProviderRowModel provides the following functionality:

  • caching of data from the underlying GridDataProvider
  • sorting support for non-paging GridDataProvider instances that do not support it themselves (not yet implemented)
  • filtering support for non-paging GridDataProvider instances that do not support it themselves (not yet implemented)
  • conversion of events on the GridColumnModel to method calls on the GridDataProvider, including conversion of many separate filter calls into a single call containing all the information.
The DataProviderRowModel defines a model for acquiring row data and for listening to row model events.

Constructor

new module:caplin/grid/DataProviderRowModel(columnModel, dataProvider)

Constructs a caplin.grid.DataProviderRowModel.
Parameters:
Name Type Description
columnModel module:caplin/grid/GridColumnModel | GridColumnModel The column model this row model is associated with — necessary for listening to sorting and filtering events on the column model.
dataProvider module:caplin/grid/GridDataProvider | GridDataProvider The data provider instance that will do the actual work of providing the data that will be contained by the row model.
Implements:

Members

(static, readonly) OBJECT_DATA_TIMEOUT :int

The amount of time to wait for each object before firing module:caplin/grid/GridRowModelListener#onAllDataReceived
Type:
  • int

Methods

canReceive()

Implements:
See:

canReceiveMultipleObjects()

Implements:
See:

canReceiveObjects()

Implements:
See:

getLastReceiveFailureMessage()

Implements:
See:

getSubjects()

Implements:
Deprecated:
  • Yes

getSuccessMessage()

See:

receiveObjects()

Implements:
See:

setRowDataBySubject(index, rowData)

Method added to allow editing data inside grid. The implementation adds the field to a field cache which overrides the fields received from rttp Sets the field value for the row with the specific index
Parameters:
Name Type Description
index int index id of the row to add field
rowData Map field maps to update

supportsFeature(feature)

Determine whether this instance of GridRowModel supports a particular feature.

This method is merely proxied on to the underlying module:caplin/grid/GridDataProvider.

Parameters:
Name Type Description
feature int the feature constant that is being queried.
Implements:
See: