I try to use a PageableListView with PagingNavigation. From the examples that looks quite easy, but I can't get it to work. I always get the following error message:
The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup
Here is my java code:
class FriendsPanel extends Panel {
public FriendsPanel(String id){
super(id);
List<User> friends = ...;
PageableListView<User> listview = new PageableListView<User>("listview", friends, 10) {
protected void populateItem(ListItem<User> item) {
User user = item.getModel().getObject();
item.add(new Label("label", user.getName()));
}
};
add(listview);
add(new PagingNavigation("navigator", listview));
}
}
}
My html looks like this:
<html xmlns:wicket>
<wicket:panel>
<br />
<span wicket:id="listview">
<span wicket:id="label">label</span><br>
</span>
<div wicket:id="navigator"></div>
</wicket:panel>
</html>
Any ideas how to make this work?