table.setShowBanner(true);
table.setSortable(true);
table.setPaginator(new TableInlinePaginator(table));
table.setPaginatorAttachment(Table.PAGINATOR_INLINE);
Column column = new Column(Customer.NAME_PROPERTY);
column.setWidth("140px;");
table.addColumn(column);
column = new Column(Customer.EMAIL_PROPERTY);
column.setAutolink(true);
column.setWidth("230px;");
table.addColumn(column);
column = new Column(Customer.AGE_PROPERTY);
column.setTextAlign("center");
column.setWidth("40px;");
table.addColumn(column);
column = new Column(Customer.HOLDINGS_PROPERTY);
column.setFormat("${0,number,#,##0.00}");
column.setTextAlign("right");
column.setWidth("100px;");
table.addColumn(column);
editLink.setImageSrc("/assets/images/table-edit.png");
editLink.setTitle("Edit customer details");
editLink.setParameter("referrer", "/table/search-table.htm");
deleteLink.setImageSrc("/assets/images/table-delete.png");
deleteLink.setTitle("Delete customer record");
deleteLink.setAttribute("onclick", "return window.confirm('Are you sure you want to delete this record?');");
column = new Column("Action");
column.setTextAlign("center");
AbstractLink[] links = new AbstractLink[] { editLink, deleteLink };
column.setDecorator(new LinkDecorator(table, links, "id"));
column.setSortable(false);
table.addColumn(column);
table.setDataProvider(new DataProvider<Customer>() {
public List<Customer> getData() {
return getCustomerService().getCustomers(nameField.getValue(),