Menu
This widget displays the field as a list box of possible values, of which one or more can be selected.
XHTML Specification: <x-subst
type="select">
For more information, see <x-subst type="WidgetType"> .
Widget Properties
Property | Description |
---|---|
Value/Representation | Specify the values and their
representations of the items in the widget Note: The format of the values in the ValRep must be same as the display format of the field. |
Exclude | Do not load the field in the server page if it does not need to be sent to the browser. |
Description
When the field definition is copied to the layout, the XHTML source code similar to the following:
<x-subst size="1" name="MENU.MY_ENTITY.MY_MODEL" type="select"> <select name="MENU.MY_ENTITY.MY_MODEL" size="1"> <option>Menu</option> </select> </x-subst>
Uniface converts the ValRep defined for the field into individual options in the list.
The list and menu USP widgets differ in that the size of the list control is greater than 1 and the size of the menu control is equal to 1.
ValRep Handling
The widget uses the ValRep list defined for the field to build up the options visible in the list. It expects a list of Value=Representation pairs and displays the representations in the list. If a ValRep item does not have a Representation, the Value is displayed instead. When the user selects an item in the list, the corresponding value is selected.
If you want to define an empty string value as one of the items in the list, enter a representation without a corresponding value. You can test for empty string values by testing for an empty string ("").
For more information, see ValRep.