Rich Platform project for Java web applications.
This project is maintained by aktion-hip
The class implementing the org.ripla.interfaces.IMenuItem interface represents a composite structure:
public interface IMenuItem extends IMenuElement { int getPosition(); }
public interface IMenuElement { List<IMenuItem> getSubMenu(); String getLabel(); String getControllerName(); String getPermission(); }
The menu structure is defined in IMenuElement.getSubMenu(). Each IMenuElement node can act as parent for a sub menu tree.
The relative position of a menu element is defined by IMenuItem.getPosition(). The higher the position, the lower the item within the list of items of the same level. In the main menu bar, the menu node are placed in ascending order from left to right.
IMenuElement.getLabel() returns the label displayed by the menu item.
IMenuElement.getControllerName() returns the (fully qualified) name of the controller activated when a user clicks on the menu item.
IMenuElement.getPermission() controlles whether the menu item is displayed or not. If a user doesn't have the permission to display a view, the corresponding menu item has to be hidden to prevent the activation of the view's controller.
org.ripla.web.menu.RiplaMenuItem is a leaf implementation of IMenuItem whereas org.ripla.web.menu.RiplaMenuComposite is a menu item implementation that can contain sub menus. See The Use Case's Main Menu for an example how to create a main menu item with submenu.