You are on page 1of 1

THE MENU WIDGET COOKBOOK

========================
A short guide on how to use the OFBIZ menu-widget
The menu widget can be used to generate the appbars, such the one for Main | Dat
a Source | Campaign | Tracking | Segment | Contact List | Reports | Logout
o Defining a menu
<menu-item name="DataSource" title="${uiLabelMap.DataSource}"><link target="Find
DataSource"/></menu-item>
name is used to reference this menu item.
title is displayed on the menu and can be a uiLabelMap
link specifies the "target" URI for this menu item
o Getting a particular menu link highlighted
Put
<set field="headerItem" value="reports"/>
in the <actions> section of a <screen> in screen widget. value="" should poin
t to one of the menu-item names defined above.
o Conditional display of menu items
Use the <condition> element of the <menu-item> tag:
<condition><not><if-empty field-name="userLogin"/></not></condition>
<condition><if-empty field-name="userLogin"/></condition>
o using CSS styles
Use these attributes of menu-item
align-style="" defines alignment
widget-style="" defines style when the menu item is not selected
selected-style="" defines style when the menu item is selected
o Right aligning menu items
Use align-style="col-right" to use the "col-right" CSS style in OFBIZ
Note that this style puts the first instance (first menu-item) to the right mo
st and subsequent ones to the left of it

You might also like