Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

There are a few ways to display and populate table/grid data in wicket. They include:

If you look at the class hieararchy you will see that every repeater builds on the other.

...

You can see each of these components in action here.

A Simple DataView Example by Adam A. Koch
A Simple Sortable DataTable Example by Adam A. Koch

The Details

Repeating View

...

This is a view that extends the DataView with the idea of populators and makes displaying tabular data easy by letting populators populate each cell instead of you doing that in populateItem() yourself. The idea is that depending on your application logic (eg. roles/permissions etc.) you can vary the list of populators and simplify the logic.

DataTable

This is the mcdaddy mac daddy of the table oriented components. DataTable extends the tree not by inheritance but by delegation. It wraps a DataGridView and provides all the markup for you so you dont have to. It adds support for interchangeable toolbars like sortable headers, filters, pagers, etc.