DataView is a basic implementation of AbstractDataView. Data views aim to make it very simple to populate your repeating view from a database by utilizing {@link IDataProvider} to act as an interface between the database and the dataview.
Example:
<tbody> <tr wicket:id="rows"> <td><span wicket:id="id">Test ID</span></td> ...
Though this example is about a HTML table, DataView is not at all limited to HTML tables. Any kind of list can be rendered using DataView.
And the related Java code:
add(new DataView<UserDetails>("rows", dataProvider) { public void populateItem(final Item<UserDetails> item) { final UserDetails user = item.getModelObject(); item.add(new Label("id", user.getId())); } });
@see IDataProvider
@see IPageable
@author Igor Vaynberg (ivaynberg)
@param < T> The Model type.