May 2015
Beginner to intermediate
412 pages
8h 44m
English
A menu button is a button that displays multiple menu items in a popup when it is clicked on or pressed. A popup is an absolutely positioned element (overlay) in terms of CSS.
In this recipe, we will learn the structure of p:menuButton—a JSF tag for the menuButton component.
The p:menuButton tag incorporates one or more menu items. The following code snippet demonstrates four menu items that send AJAX and GET requests:
<p:menuButton value="CRUD Operations" iconPos="right"> <p:menuitem value="Save" actionListener="#{menuButtonBean.save}" icon="ui-icon-disk" update="growl"/> <p:menuitem value="Update" actionListener="#{menuButtonBean.update}" icon="ui-icon-arrowrefresh-1-w" update="growl"/> <p:menuitem ...Read now
Unlock full access