Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0.11
-
None
-
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;