Home » tapestry-src-5.0.19 » org.apache.tapestry5.corelib.components » [javadoc | source]
org.apache.tapestry5.corelib.components
public class: Grid [javadoc | source]
java.lang.Object
   org.apache.tapestry5.corelib.components.Grid

All Implemented Interfaces:
    GridModel

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 a org.apache.tapestry5.corelib.components.Form . 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 org.apache.tapestry5.grid.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 org.apache.tapestry5.PrimaryKeyEncoder (via the encoder parameter).

Nested Class Summary:
static class  Grid.CachingDataSource  A version of GridDataSource that caches the availableRows property. This addresses TAPESTRY-2245. 
class  Grid.DefaultGridSortModel  Default implementation that only allows a single column to be the sort column, and stores the sort information as persistent fields of the Grid component. 
Field Summary
static final  ComponentAction<Grid> SETUP_DATA_SOURCE     
Method from org.apache.tapestry5.corelib.components.Grid Summary:
afterRender,   beginRender,   defaultModel,   defaultSortModel,   getCurrentPage,   getDataModel,   getDataSource,   getPagerBottom,   getPagerTop,   getRow,   getRowsPerPage,   getSortModel,   onInPlaceUpdate,   reset,   setCurrentPage,   setRow,   setupDataSource,   setupRender
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.corelib.components.Grid Detail:
  void afterRender(MarkupWriter writer) 
 Object beginRender(MarkupWriter writer) 
 protected Binding defaultModel() 
 GridSortModel defaultSortModel() 
 public int getCurrentPage() 
 public BeanModel getDataModel() 
 public GridDataSource getDataSource() 
 public Object getPagerBottom() 
 public Object getPagerTop() 
 public Object getRow() 
 public int getRowsPerPage() 
 public GridSortModel getSortModel() 
  void onInPlaceUpdate(String zone) throws IOException 
 public  void reset() 
    Resets the Grid to inital settings; this sets the current page to one, and {@linkplain org.apache.tapestry5.grid.GridSortModel#clear() clears the sort model}.
 public  void setCurrentPage(int currentPage) 
 public  void setRow(Object row) 
  void setupDataSource() 
 Object setupRender()