ListView<Breadcrumb> breadcrumbsView = new ListView<Breadcrumb>("breadcrumbsItems", path) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<Breadcrumb> item) {
Breadcrumb breadcrumb = item.getModelObject();
String breadcrumbTitle = getBreadcrumbTitle(breadcrumb);
try {
item.add(linkFactory.getLink("breadcrumbLink", breadcrumb.getTarget()).
add(new Label("breadcrumbSign", breadcrumbTitle))
);
} catch (BusinessLogicException e) {
log.error("Cannot create link component for the breadcrumb", e);
throw new BusinessLogicException("Cannot create link component for the breadcrumb", e);
}
item.add(new Label("breadcrumbsDivider", BREADCRUMB_DIVIDER).
setVisible(breadcrumb.getIndex() > 0));
}
};
add(breadcrumbsView);
}