Class GridRows
java.lang.Object
org.apache.tapestry5.corelib.components.GridRows
Renders out a series of rows within the table.
Inside a
Form
, a series of row index numbers are stored into the form
( as
ComponentActions). This can be a problem in situations where the data set
can shift between the form render and the form submission, with a risk of
applying changes to the wrong objects.
For this reason, when using GridRows inside a Form, you should generally
provide a ValueEncoder
(via the encoder
parameter), or use an entity type for the "row" parameter for which
Tapestry can provide a ValueEncoder automatically. This will allow Tapestry
to use a unique ID for each row that doesn't change when rows are reordered.Name | Type | Flags | Default | Default Prefix |
---|---|---|---|---|
columnIndex | int | prop | ||
Optional output parameter that stores the current column index. | ||||
currentPage | int | Required | prop | |
The current page number within the available pages (indexed from 1). | ||||
encoder | org. | prop | ||
A ValueEncoder used to convert server-side objects (provided by the "row" parameter) into unique client-side strings (typically IDs) and back. In general, when using Grid and Form together, you should either provide the encoder parameter or use a "row" type for which Tapestry is configured to provide a ValueEncoder automatically. Otherwise Tapestry must fall back to using the plain index of each row, rather than the ValueEncoder-provided unique ID, for recording state into the form. | ||||
gridModel | org. | componentResources. | prop | |
Object that provides access to the bean and data models used to render the Grid. | ||||
lean | boolean | prop | ||
If true, then the CSS class on each TD cell will be omitted, which can reduce the amount of output from the component overall by a considerable amount. Leave this as false, the default, when you are leveraging the CSS to customize the look and feel of particular columns. | ||||
overrides | org. | Required, Not Null | prop | |
Where to search for property override blocks. | ||||
row | Object | Required | prop | |
The current row being rendered, this is primarily an output parameter used to allow the Grid, and the Grid's container, to know what object is being rendered. | ||||
rowClass | String | Not Cached | prop | |
Parameter used to set the CSS class for each row (each tr element) within the tbody). This is not cached, so it will be recomputed for each row. | ||||
rowIndex | int | prop | ||
Optional output parameter (only set during rendering) that identifies the current row index. This is the index on the page (i.e., always numbered from zero) as opposed to the row index inside the org.apache.tapestry5.grid.GridDataSource. | ||||
rowsPerPage | int | Required | prop | |
Number of rows displayed on each page. Long result sets are split across multiple pages. | ||||
volatile | boolean | prop | ||
If true and the component is enclosed by a Form, then the normal state saving logic is turned off. Defaults to false, enabling state saving logic within Forms. This can be set to false when form elements within the Grid are not related to the current row of the grid, or where another component (such as org.apache.tapestry5.corelib.components.Hidden) is used to maintain row state. |
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GridRows
public GridRows()
-
-
Method Details
-
getPropertyNames
-
getPropertyName
-
setPropertyName
-