Search in sources :

Example 1 with SideBarMenuItem

use of com.evolveum.midpoint.web.component.menu.SideBarMenuItem in project midpoint by Evolveum.

the class PageBase method getActiveMenu.

private <MI extends BaseMenuItem> MI getActiveMenu() {
    LeftMenuPanel sideBarMenu = getSideBarMenuPanel();
    if (sideBarMenu == null || !sideBarMenu.isVisible()) {
        return null;
    }
    List<SideBarMenuItem> sideMenuItems = sideBarMenu.getItems();
    if (CollectionUtils.isEmpty(sideMenuItems)) {
        return null;
    }
    for (SideBarMenuItem sideBarMenuItem : sideMenuItems) {
        MI activeMenu = sideBarMenuItem.getActiveMenu(PageBase.this);
        if (activeMenu != null) {
            return activeMenu;
        }
    }
    return null;
}
Also used : SideBarMenuItem(com.evolveum.midpoint.web.component.menu.SideBarMenuItem) LeftMenuPanel(com.evolveum.midpoint.gui.impl.component.menu.LeftMenuPanel)

Aggregations

LeftMenuPanel (com.evolveum.midpoint.gui.impl.component.menu.LeftMenuPanel)1 SideBarMenuItem (com.evolveum.midpoint.web.component.menu.SideBarMenuItem)1