SplitButton

SplitButton displays a default command and additional ones in an overlay.

<h:form>
    <p:growl id="messages" />

    <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5">
        <p:outputLabel for="basic" value="Basic:" />
        <p:splitButton id="basic" value="Save" actionListener="#{buttonView.save}" update="messages" icon="ui-icon-disk">
            <p:menuitem value="Update" actionListener="#{buttonView.update}" update="messages" icon="ui-icon-arrowrefresh-1-w" />
            <p:menuitem value="Delete" actionListener="#{buttonView.delete}" ajax="false" icon="ui-icon-close" />
            <p:separator />
            <p:menuitem value="Homepage" url="http://www.primefaces.org" icon="ui-icon-extlink" />
        </p:splitButton>  

        <p:outputLabel for="dynaButton" value="Programmatic Menu:" />
        <p:splitButton id="dynaButton" value="Save" model="#{buttonView.model}" actionListener="#{buttonView.save}" update="messages" icon="ui-icon-disk"></p:splitButton>

        <p:outputLabel for="advanced" value="Advanced:" />
        <p:splitButton id="advanced" value="Save" actionListener="#{buttonView.save}" update="messages" icon="ui-icon-disk" filter="true" filterMatchMode="startsWith">
            <p:submenu label="Ajax">
                <p:menuitem value="Save" actionListener="#{buttonView.save}" update="messages" icon="ui-icon-disk" />
                <p:menuitem value="Update" actionListener="#{buttonView.update}" update="messages" icon="ui-icon-arrowrefresh-1-w"/>
            </p:submenu>
            <p:submenu label="Non-Ajax">
                <p:menuitem value="Delete" actionListener="#{buttonView.delete}" update="messages" ajax="false" icon="ui-icon-close"/>
            </p:submenu>
            <p:submenu label="Navigations">
                <p:menuitem value="External" url="http://www.primefaces.org" icon="ui-icon-home"/>
            </p:submenu>
            <p:separator />
            <p:menuitem value="sInternal" icon="ui-icon-star"/>
        </p:splitButton> 
    </h:panelGrid>
</h:form>