Menu Button

Table of Contents


The MenuButton will allow the user to create a list of objects with a value, label, panelConfirmation and submitNotification which will trigger an ActionEvent when the option is selected.(Action and ActionListeners is supported)

This component is styled for the devices that this project supports to most look and feel like the native html5 select tag on the devices/desktop browsers. As for all mobi components, use

to have proper css loaded for each device.

MenuButtonGroup component will group the menuButtonItem components that represent the actual selected item.

If an Action or ActionListener is required and form submission is not required or desired, then place a singleSubmit="true" attribute on the button and only the button will be submitted to the server, firing the Action/ActionListener's method, with the resulting update. Otherwise, the button will submit the entire form (normal function). This component also has mobi:ajax support


Basic Use (no singleSubmit, mobi:ajax, panelConfirmation or submitNotification)

<mobi:menuButton id="mnu1" buttonLabel="Action Menu" 
                 selectTitle="Choose Item">
    <mobi:menuButtonGroup label="Group1">
        <mobi:menuButtonItem label="item1"
    <mobi:menuButtonGroup label="Group2">
         <mobi:menuButtonItem label="item2a"
         <mobi:menuButtonItem label="item2b"

Using singleSubmit (can be done by individual item in the backing bean for example). Can also choose a panelConfirmation or submitNotification the same way.

        <mobi:menuButton id="menu1" value="#{}" var="item">
                <mobi:menuButtonItem value="#{item.value}" label="#{item.label}"
                                     disabled="#{item.disabled}" actionListener="#{item.actionMethod}"/>

In the backing bean, just populate the values for each of the "item" attributes. In this way, for example, you may want to just have a "Cancel" selection in the menuButton submit itself and trigger a method with the actionListener attribute. In this way, the singleSubmit property for the "Cancel" option can be set to true while the other options can be triggering full form submit (if that is the required use-case).

Can also use a collection bound to the value attribute with a var attribute denoting the individual record in the collection.

Component Documentation


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2016 ICEsoft Technologies Canada Corp.