The Menu component is an interface element consisting of one or more options. The component is intended to be used in cases where there can be more than one possible action related to a particular event of a component (such as clicking an hyperlink). In such cases, invoking the particular event on the component will open the popup menu which shows the list of possible actions that can be performed for that particular event.
The Menu component is a JavaServer Faces 1.2 component. You see components that use this
version of JavaServer Faces when your project uses Java EE 5. For more information on JavaServer Faces 1.2,
see:
After dragging the Menu component to from the Woodstock Composite category of the Palette to the Visual Designer, you can:
Select the Menu component and edit its properties in the Menu's Properties window. Some typical properties you might set are:
items. Specifies the items from which the web application user can choose. The value must be one of an array, Map, or Collection whose members are all subclasses of com.sun.webui.jsf.model.Option.
id. The name of the component. In the JSP file, this name is the value of the component's id attribute. In the page bean, this property's value is the name of the Menu object.
immediate. The immediate flag.
submitForm. When set to true, the form is immediately submitted when the user changes the selection in the menu.
visible.
Right-click the Menu component and choose one of several actions:
Edit processEvent Event Handler. Opens the Source Editor, allowing you to edit the processEvent method.
Add Binding Attribute. This option adds a binding attribute to the Menu component.
Note: If you plan to script the component in Java code, you must manually add a binding attribute, which is bound using a value binding expression to a property of the backing page bean.
Remove Binding Attribute. This option removes the binding attribute from the component.
Configure Ajax Transactions. This option opens the Configure Ajax Transactions dialog box in which you can configure or add an Ajax transaction.
Snap to Grid. This option aligns the Menu component along the grid lines in the Visual Designer.
Preview in Browser. See how the page renders in the default web browser for your system.