Friday, June 1, 2012

Data Table Component in Wicket

Wicket provides a Data Table component that can be easily reused to create data tables.
  • Use the class AjaxFallbackDefaultDataTable
  • Define the columns by creating them one-by-one and adding them to the Data Table
  • This can be an AbstractColumn where you provide the component to use inside the cell
  • Or a PropertyColumn where the cell shows data bound to a model
  • Also provide a database provider implementing SortableDataProvider
  • Within the provider, implement iterator, size, and model methods
  • The table can be styled via CSS that you provide
Example code can be found in Wicket Examples

References:

No comments:

Post a Comment