Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2271

Expose the Grid's rowsPerPage and row properties to Java code (instead of using @Property)


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: Core Components
    • Labels:
    • Environment:


      Application code which makes use of Grid's rowsPerPage property at compile time no longer compiles because the _rowsPerPage field has been converted to use new @Property annotation:


      • The number of rows of data displayed on each page. If there are more rows than will fit, the Grid will divide up
      • the rows into "pages" and (normally) provide a pager to allow the user to navigate within the overall result
      • set.
        private int _rowsPerPage;

      In this case it is legitimate expectation to have old-fashioned getter and setters so that pages & components which use Grid internally can still read and write this property. For example:

      private Grid _grid;

      public void foo() {
      _grid.getRowsPerPage(); // do something with this value

      Similarly, there are few other Grid fields annotated with @Property which may also be considered as candidates for classic getters and setters. I don't have a need for those personally, but others may:


      • Used to store the current object being rendered (for the current row). This is used when parameter blocks are
      • provided to override the default cell renderer for a particular column ... the components within the block can
      • use the property bound to the row parameter to know what they should render.
        private Object _row;


      • The CSS class for the tr element for each data row. This can be used to highlight particular rows, or cycle
      • between CSS values (for the "zebra effect"). If null or not bound, then no particular CSS class value is used.
        @Parameter(cache = false)
        @Property(write = false)
        private String _rowClass;


      • CSS class for the <table> element. In addition, informal parameters to the Grid are rendered in the table
      • element.
        @Parameter(name = "class", defaultPrefix = TapestryConstants.LITERAL_BINDING_PREFIX, value = "t-data-grid")
        @Property(write = false)
        private String _tableClass;




            • Assignee:
              hlship Howard M. Lewis Ship
              penguin74 Adam Zimowski
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - 1h
                Remaining Estimate - 1h
                Time Spent - Not Specified
                Not Specified