Menus
Nested Menus
Menus are configured inline in the JSP page:
Any menu item can point to a plain URL or an action/event pair, and may have nested <l:param> tags. Each menu item will add automatically a "selected" css class only if the current url matches its target url and all included parameters are found. In the above example, if the current request is "mail/folders?folderName=INBOX" the last menu item will be marked as selected.
The "aliases" attribute indicates alternate events that may mark the same menu item as selected. In this example 'Leasing.listAll', 'Leasing.create' and 'Mortgages.save' are all events that will mark the second menu item as "selected" (even if they are not the menu item target).
Menu items that the user is not authorized to invoke will not be rendered by default.
LocaleMenu
These menus are used to select the user locale. The default locale is provided by the browser, but it can be overriden by setting a "locale" cookie either by javascript or from the server side.
Adding javascript to your menus
Menus should still work even when javascript is off.
Caching menus
Performance can be improved by caching menu contents at the server, where its "id" attribute will be used as the cache key. Supported cache scopes are "session", "application" and "none". The default is "application" for locale menus and "none" for normal menus.
Cached menus will skip their body, so any changes will go unnoticed until the server or the browser gets restarted (or alternatively, by setting the caching type to "none" on the JSP page).
Menu decorators
There are two menu decorators: nested and inline. They can be used by setting decorator="nested" or "inline" at any menu.
Inline menus are a sequence of links separated by an itemSeparator that defaults to '|'. They only support a single menu level, and are the default for locale menus.
Nested menus are lists of unordered items (ul) rendered hierarchically.
For example, to change the default layout of a menu from a list of items to a single line of links separated by "|", use this: