|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.corelib.components.Grid
@SupportsInformalParameters public class Grid
A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need.
A Grid may operate inside aForm. By overriding the cell renderers of
properties, the default output-only behavior can be changed to produce a complex form with individual control for
editing properties of each row. This is currently workable but less than ideal -- if the order of rows provided by
the GridDataSource changes between render and form submission, then there's the
possibility that data will be applied to the wrong server-side objects. In general, when using Grid and Form
together, you want to provide the Grid with a PrimaryKeyEncoder (via the encoder
parameter).
BeanModel,
BeanModelSource,
GridDataSource| Constructor Summary | |
|---|---|
Grid()
|
|
| Method Summary | |
|---|---|
protected Binding |
defaultModel()
Returns a Binding instance that attempts to identify the model from the source
parameter (via GridDataSource.getRowType(). |
int |
getCurrentPage()
|
BeanModel |
getDataModel()
Returns the data model, which defines the columns (in terms of properties of the row type), and provides access to actual values for a given row instance. |
GridDataSource |
getDataSource()
Returns the source for the data to be presented in the Grid. |
Object |
getPagerBottom()
|
Object |
getPagerTop()
|
Object |
getRow()
|
int |
getRowsPerPage()
|
GridSortModel |
getSortModel()
Returns the object used to track sorting behavior of the Grid. |
void |
reset()
Resets the Grid to inital settings; this sets the current page to one, and clears the sort model. |
void |
setCurrentPage(int currentPage)
|
void |
setRow(Object row)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Grid()
| Method Detail |
|---|
protected Binding defaultModel()
Binding instance that attempts to identify the model from the source
parameter (via GridDataSource.getRowType(). Subclasses may override to provide
a different mechanism. The returning binding is variant (not invariant).
BeanModelSource.createDisplayModel(Class, org.apache.tapestry5.ioc.Messages)public BeanModel getDataModel()
GridModel
getDataModel in interface GridModelpublic GridDataSource getDataSource()
GridModel
getDataSource in interface GridModelpublic GridSortModel getSortModel()
GridModel
getSortModel in interface GridModelpublic Object getPagerTop()
public Object getPagerBottom()
public int getCurrentPage()
public void setCurrentPage(int currentPage)
public int getRowsPerPage()
public Object getRow()
public void setRow(Object row)
public void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||