wicket link example

this example about a link in PageableListView;

available code in mercurial repository here


PageableListView authorsTable = new PageableListView("authors", auths,10){
@Override
protected void populateItem(ListItem item) {
Author author = (Author) item.getModelObject();
item.add(new Label("authId", Integer.toString(author.getAuthorId())));

Link authorlink = new Link("authorlink", item.getModel()) {
@Override
public void onClick() {
setResponsePage(new AuthorPage());
}
};
authorlink.add(new Label("authName", author.getAuthorName()));
item.add(authorlink);
}
};

sirin

Advertisements