Class GridRows


  • public class GridRows
    extends java.lang.Object
    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.
    Component Parameters 
    NameTypeFlagsDefaultDefault Prefix
    columnIndexint  prop
    Optional output parameter that stores the current column index.
    currentPageintRequired prop
    The current page number within the available pages (indexed from 1).
    encoderorg.apache.tapestry5.ValueEncoder  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.
    gridModelorg.apache.tapestry5.grid.GridModel componentResources.containerprop
    Object that provides access to the bean and data models used to render the Grid.
    leanboolean  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.
    overridesorg.apache.tapestry5.PropertyOverridesRequired, Not Null prop
    Where to search for property override blocks.
    rowObjectRequired 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.
    rowClassStringNot 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.
    rowIndexint  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.
    rowsPerPageintRequired prop
    Number of rows displayed on each page. Long result sets are split across multiple pages.
    volatileboolean  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 
      Constructor Description
      GridRows()