Tapestry
  1. Tapestry
  2. TAPESTRY-2271

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

    Details

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

      Description

      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.
        */
        @Parameter("25")
        @Property
        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:

      @Component
      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.
        */
        @Parameter
        @Property
        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;

        Activity

        Adam Zimowski created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Summary Grid's _rowsPerPage is no longer readable & writable due to attached @Property. Expose the Grid's rowsPerPage and row properties to Java code (instead of using @Property)
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12426686 ] Default workflow, editable Closed status [ 12569382 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12569382 ] jira [ 12590639 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development