| org.apache.tapestry.grid.GridDataSource
All known Subclasses: org.apache.tapestry.internal.grid.ListGridDataSource, org.apache.tapestry.internal.grid.NullDataSource,
GridDataSource | public interface GridDataSource (Code) | | Defines how a
Grid components (and its sub-components) gain access to the row data that
is displayed on the page. In many cases, this is just a wrapper around a simple List, but the
abstractions exist to support access to a large data set that is accessible in sections.
|
Method Summary | |
int | getAvailableRows() Returns the number of rows available in the data source. | Class | getRowType() Returns the type of value in the rows, or null if not known. | Object | getRowValue(int index) Returns the row value at the provided index. | void | prepare(int startIndex, int endIndex, PropertyModel sortModel, boolean ascending) Invoked to allow the source to prepare to present values. |
getAvailableRows | int getAvailableRows()(Code) | | Returns the number of rows available in the data source.
|
getRowType | Class getRowType()(Code) | | Returns the type of value in the rows, or null if not known. This value is used to create a
default
GridDataModel when no such model is provided.
the row type, or null |
getRowValue | Object getRowValue(int index)(Code) | | Returns the row value at the provided index. This method will be invoked in sequential order.
|
prepare | void prepare(int startIndex, int endIndex, PropertyModel sortModel, boolean ascending)(Code) | | Invoked to allow the source to prepare to present values. This gives the source a chance to
pre-fetch data (when appropriate) and informs the source of the desired sort order.
Parameters: startIndex - the starting index to be retrieved Parameters: endIndex - the ending index to be retrieved Parameters: sortModel - the property model that defines what data will be used for sorting, or null if nosorting is required (in which case, whatever natural order is provided by theunderlying data source will be used) Parameters: ascending - if true, then sort ascending, else decending |
|
|