//TODO: create the separate 'TopMenu' component
add(new ListView("topMenuItem", menuService.filterAccordingPermissions(menuService.getTopItems())) {
@Override
protected void populateItem(ListItem item) {
MenuItem menuItem = (MenuItem) item.getModelObject();
Leaf leaf = menuItem.getFirstLeaf();
if(leaf != null) {
Class<Page> pageClass = leaf.getPageClass();
try {
Link link = linkFactory.getLink("topMenuRef", new PageTarget(pageClass));
link.getLocalizer();
link.add(new Label("topMenuSign", menuService.getTitle(menuItem)).setEscapeModelStrings(false));
link.add(new ContextImage("topMenuImage", MENU_IMAGES_FOLDER + menuService.getImage(menuItem)));