This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • A Simple DataView Example
Skip to end of metadata
Go to start of metadata

This does assume you have a "Base Page".
import java.util.ArrayList;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

public class Sub1Page extends BasePage {

    public Sub1Page() {
        Contact contact = null;
        ArrayList list = new ArrayList();

        char character;
        // a - z
        for (int i = 97; i < 123; i++) {
            character = (char) i;
            contact = new Contact(String.valueOf(character));
        final DataView dataView = new DataView("simple", new ListDataProvider(
                list)) {
            public void populateItem(final Item item) {
                final Contact user = (Contact) item.getModelObject();
                item.add(new Label("id", user.getId()));


        add(new PagingNavigator("navigator", dataView));


class Contact implements Serializable {

    private final String id;

    public Contact(String id) { = id;

    public String getId() {
        return id;


<table cellspacing="0" class="dataview">
       <tr wicket:id="simple">
         <td><span wicket:id="id">Test ID</span></td>

<div wicket:id="navigator"></div>