Interface
caplin.grid.dataprovider.expandable

ChildRowDataProvider

ChildRowDataProvider defines an interface for classes that wish to provide child row data to an implementation of the caplin.grid.dataprovider.expandable.ChildRowDataProviderListener. The standard ChildRowDataProviderListener implementation is caplin.grid.dataprovider.expandable.ExpandableRowGridDataProvider.

Three arguments are passed into a ChildRowDataProvider firstly the caplin.grid.dataprovider.expandable.ChildRowDataProviderListener secondly the caplin.grid.GridColumnModel and thirdly the XML configuration in the grid definition for the ChildRowDataProvider from the "config" attribute.

<childRowDataProvider class="caplin.grid.dataprovider.expandable.ContainerChildRowDataProvider" config="caplinx.grid.dataprovider.expandable.ContainerChildRowConfig"/>

Constructor Summary

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

Method Summary

Attributes Name and Description
void expandedRowClosed(String sSubject)

Signals the ChildRowDataProvider to permanently terminate updates to the ChildRowDataProviderListener for the specified sSubject.

void getExpandedRowData(String sSubject, Map mRowData, int nVisibleSize)

Instructs the ChildRowDataProvider to get the child rows to be displayed in a grid.

void pauseUpdates()

Signals the ChildRowDataProvider to temporarily pause updates to any ChildRowDataProviderListener instances.

void resumeUpdates()

Signals the ChildRowDataProvider to resume updates to all ChildRowDataProviderListener instances.

void setRequiredFields(Array pFieldNames)

Sets the required fields that this data provider should provide within each record.

void setRowRange(String sExpandedRowSubject, int nStartIndex, int nSize)

Sets the start index and total number of rows that this ChildRowDataProvider should supply when notifying ChildRowDataProviderListeners of row updates — this will change as the view is scrolled or resized to reveal different rows.

void terminateUpdates()

Signals the ChildRowDataProvider to permanently terminate updates to any ChildRowDataProviderListener instances.

Constructor Detail

caplin.grid.dataprovider.expandable.ChildRowDataProvider(caplin.grid.dataprovider.expandable.ChildRowDataProviderListener oExpandableRowGridDataProvider, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)

Parameters
caplin.grid.dataprovider.expandable.ChildRowDataProviderListener oExpandableRowGridDataProvider The listener
caplin.grid.GridColumnModel oGridColumnModel The grid column model
String sConfigClass The config class.

Method Detail

void expandedRowClosed(String sSubject)

Signals the ChildRowDataProvider to permanently terminate updates to the ChildRowDataProviderListener for the specified sSubject.

Perform any clean-up that may be required for these child rows.

Parameters
String sSubject The subject of the row that has been closed.

void getExpandedRowData(String sSubject, Map mRowData, int nVisibleSize)

Instructs the ChildRowDataProvider to get the child rows to be displayed in a grid. When data is received call backs are made via the caplin.grid.dataprovider.expandable.ChildRowDataProviderListener interface.

Parameters
String sSubject The subject of the row that has been expanded and for which the child rows are being requested.
Map mRowData Data related to the row that has been expanded. This can be used to determine what expanded row data should be retrieved by the data provider.
int nVisibleSize The maximum number of child rows that could be visible. The number of rows from the parent row to the last possible, visible row in the grid.
Returns
void

void pauseUpdates()

Signals the ChildRowDataProvider to temporarily pause updates to any ChildRowDataProviderListener instances.

void resumeUpdates()

Signals the ChildRowDataProvider to resume updates to all ChildRowDataProviderListener instances.

void setRequiredFields(Array pFieldNames)

Sets the required fields that this data provider should provide within each record.

Parameters
Array pFieldNames A list of field names as strings.

void setRowRange(String sExpandedRowSubject, int nStartIndex, int nSize)

Sets the start index and total number of rows that this ChildRowDataProvider should supply when notifying ChildRowDataProviderListeners of row updates — this will change as the view is scrolled or resized to reveal different rows.

Parameters
String sExpandedRowSubject The expanded row that this row range applies to.
int nStartIndex The start index of the first row within the range.
int nSize The number of rows within the range.

void terminateUpdates()

Signals the ChildRowDataProvider to permanently terminate updates to any ChildRowDataProviderListener instances.

This method is essentially the destructor for classes implementing ChildRowDataProvider, and is the opportunity to perform any clean-up that may be required.