/***
 * Excerpted from "Domain-Driven Design Using Naked Objects",
 * published by The Pragmatic Bookshelf.
 * Copyrights apply to this code. It may not be used to create training material, 
 * courses, books, articles, and the like. Contact us if you are in doubt.
 * We make no guarantees that this code is fit for any purpose. 
 * Visit http://www.pragmaticprogrammer.com/titles/dhnako for more book information.
***/
PageableListView customerList = 
    new PageableListView(
            "customerList",
            getCustomerRepository().allCustomers(), 5) {
        ...
        protected void populateItem(ListItem item) {
            Customer customer = (Customer) item.getModelObject();
            String customerName = 
                customer.getPerson().getName().title();
            item.add(
                new Label("name", customerName));
            item.add(
                new ReplaceLink<Customer>("showVehiclesLink", ... ));
            item.add(
                new ReplaceLink<Customer>("editCustomerLink", ... ));
        }
        ...
    };
add(customerList);
