Class
caplin.grid.dataprovider.expandable

SL4BSubjectChildRowDataProvider

A ChildRowDataProvider that provides child row data from SL4B subject data. This class does not directly implement the caplin.grid.dataprovider.expandable.ChildRowDataProvider interface but instead subclasses caplin.grid.dataprovider.expandable.WrappedChildRowDataProvider.

Due to the complexity of child row data provision this data provider is configured via a separate class. The class is instantiated by the child row data provider and is specified via the "config" attribute in the childRowDataProvider tag in the grid definition.

<childRowDataProvider class="caplin.grid.dataprovider.expandable.SL4BSubjectChildRowDataProvider" config="caplinx.grid.dataprovider.expandable.FxBlotterSL4BSubjectChildRowConfig"/>

This class (caplinx.grid.dataprovider.expandable.FxBlotterSL4BSubjectChildRowConfig in the above case) configures which subject to request (getSubjectToExpanded method), which fields to request for the subject (getFieldsToRequest method), how many rows of data are to be added to the grid (getNumberOfChildRowsRows method), the row data to insert into the grid (getChildRows method) and allows the mapping of child row data to different field names (mapUpdateFieldsToCurrentGridFields method).

The getSubjectToExpanded method of the config class is passed in a map mRowData of the parent row data and the parent row id sParentSubjectId, the getFieldsToRequest is passed in the GridColumnModel, the getNumberOfChildRowsRows is passed in the GridColumnModel and the SL4B SL4B_RecordFieldData field data object, getChildRows is passed in the sParentSubject and the SL4B SL4B_RecordFieldData field data object and the mapUpdateFieldsToCurrentGridFields method is called with the mRecordUpdates map of every update to allow the mapping of values to different fields. This can be useful when a child row has a field value that does not match a parent one and therefore needs to be changed before being passed to the grid. For instance a child row has an "L3_BestBid" field but the underlying container instead uses a "BestBid" column, this method allows the config class to return a map with the "L3_BestBid" value moved to a "BestBid" field. Another method to achieve this is to add the field to the column definition in the grid XML definition.

Constructor Summary

Attributes Name and Description
caplin.grid.dataprovider.expandable.SL4BSubjectChildRowDataProvider(caplin.grid.dataprovider.expandable.ExpandableRowGridDataProvider oExpandableRowGridDataProvider, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)

A ChildRowDataProvider that provides child row data from SL4B subject data.

Methods implemented from class caplin.grid.dataprovider.expandable.WrappedChildRowDataProvider:
getChildRowConfig, setChildRowWrapper

Constructor Detail

caplin.grid.dataprovider.expandable.SL4BSubjectChildRowDataProvider(caplin.grid.dataprovider.expandable.ExpandableRowGridDataProvider oExpandableRowGridDataProvider, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)

A ChildRowDataProvider that provides child row data from SL4B subject data.

Parameters
caplin.grid.dataprovider.expandable.ExpandableRowGridDataProvider oExpandableRowGridDataProvider The expandable grid row data provider
caplin.grid.GridColumnModel oGridColumnModel The grid column model
String sConfigClass The config class.
See
caplin.grid.dataprovider.expandable.ChildRowDataProvider