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"/>
Attributes | Name and Description |
---|---|
|
caplin.grid.dataprovider.expandable.ChildRowDataProvider(caplin.grid.dataprovider.expandable.ChildRowDataProviderListener Listener, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)
|
Attributes | Name and Description |
---|---|
|
void
parentRowClosed(String sParentSubject)
Signals the |
|
void
parentRowExpanded(String sParentSubject, Map mRowData, int nVisibleSize)
Instructs the ChildRowDataProvider to get the child rows to be displayed in a grid. |
|
void
pauseUpdates()
Signals the |
|
void
resumeUpdates()
Signals the |
|
void
setChildRowsRange(String sParentSubject, int nStartIndex, int nSize)
Sets the start index and total number of rows that this |
|
void
setRequiredFields(Array pFieldNames)
Sets the required fields that this data provider should provide within each record. |
|
void
terminateUpdates()
Signals the |
►
caplin.grid.dataprovider.expandable.ChildRowDataProvider(caplin.grid.dataprovider.expandable.ChildRowDataProviderListener Listener, caplin.grid.GridColumnModel oGridColumnModel, String sConfigClass)
caplin.grid.dataprovider.expandable.ChildRowDataProviderListener | Listener | to this child row provider. |
caplin.grid.GridColumnModel | oGridColumnModel | Grid column model. |
String | sConfigClass | The config class. |
►
void
parentRowClosed(String sParentSubject)
Signals the ChildRowDataProvider
to permanently terminate updates to the ChildRowDataProviderListener
for the specified
sParentSubject
.
Perform any clean-up that may be required for these child rows.
String | sParentSubject | The subject of the row that has been closed. |
►
void
parentRowExpanded(String sParentSubject, 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.
String | sParentSubject | 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. |
►
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
setChildRowsRange(String sParentSubject, int nStartIndex, int nSize)
Sets the start index and total number of rows that this ChildRowDataProvider
should supply when notifying
ChildRowDataProviderListener
s of row updates — this will change as the view is scrolled or resized to reveal different rows.
String | sParentSubject | 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
setRequiredFields(Array pFieldNames)
Sets the required fields that this data provider should provide within each record.
Array | pFieldNames | A list of field names as strings. |
►
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.