protected MenuItem findCurrentMenuItem(Place currentPlace) { for (MenuItem menuItem : menu.asList()) { if (isSamePlace(currentPlace, menuItem.getPlace())) { if (menuItem.getWidget() instanceof FocusWidget) { ((FocusWidget) menuItem.getWidget()).setFocus(false); } return menuItem; } } return null; }
public void add(MenuItem item) { item.parent = this; children.add(item); }
protected boolean isMenuItemAllowed(MenuItem menuItem) { return application.hasAnyRole( menuItem.getRoles().toArray(new String[menuItem.getRoles().size()])); }