A ChildRowDataProvider
that provides child row data from Liberator containers. 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.ContainerChildRowDataProvider" config="caplinx.grid.dataprovider.expandable.ContainerChildRowConfig"/>
This class (caplinx.grid.dataprovider.expandable.ContainerChildRowConfig
in the above case) configures which container to
request (getContainerToExpanded
method), which fields to request for the child row container (getFieldsToRequest
method)
and allows the mapping of child row data to different field names (mapUpdateFieldsToCurrentGridFields
method).
The getContainerToExpanded
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
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 container has a field names that do not match a parent one and therefore needs to
be changed before being passed to the grid. For instance a child container has an "orderID" field but the underlying container instead uses a "tradeId"
column, this method allows the config class to return a map with the "orderId" value moved to a "tradeId" field.
Attributes | Name and Description |
---|---|
|
caplin.grid.dataprovider.expandable.ContainerChildRowDataProvider(caplin.grid.dataprovider.expandable.ChildRowDataProviderListener oExpandableRowGridDataProvider, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)
A |
►
caplin.grid.dataprovider.expandable.ContainerChildRowDataProvider(caplin.grid.dataprovider.expandable.ChildRowDataProviderListener oExpandableRowGridDataProvider, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)
A ChildRowDataProvider
that provides child row data from Liberator containers.
caplin.grid.dataprovider.expandable.ChildRowDataProviderListener | oExpandableRowGridDataProvider | The listener |
caplin.grid.GridColumnModel | oGridColumnModel | The grid column model |
String | sConfigClass | The config class. |