public void populateItem(Item<ICellPopulator<IResource>> item,
String componentId, IModel<IResource> model) {
IResource targetResource = model.getObject();
if (targetResource instanceof IDocument) {
IDocument page = (IDocument)targetResource;
item.add(new LinkPanel(componentId, page.getURI(), page.getLabel()));
} else {
item.add(new LinkPanel(componentId, targetResource, createLabelModel(model)));
}
}