@SuppressWarnings("serial")
public DemoPage() {
List<DemoLinkInfo> links = getGeoServerApplication().getBeansOfType(DemoLinkInfo.class);
add(
new ListView("demoList", links) {
public void populateItem(ListItem item) {
final DemoLinkInfo info = (DemoLinkInfo) item.getModelObject();
item.add(
new BookmarkablePageLink("theLink", info.getComponentClass())
.add(
new Label(
"theTitle",
new StringResourceModel(
info.getTitleKey(),
(Component) null,
null))));
item.add(
new Label(
"theDescription",
new StringResourceModel(
info.getDescriptionKey(), (Component) null, null)));
}
});
}
}