Menu - TieredMenu

TieredMenu displays submenus in nested overlays.

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

    <p:tieredMenu style="width:200px">
        <p:submenu label="Ajax Menuitems" icon="pi pi-refresh">
            <p:menuitem value="Save" action="#{menuView.save}" update="messages" icon="pi pi-save" />
            <p:menuitem value="Update" action="#{menuView.update}" update="messages" icon="pi pi-refresh" />
        </p:submenu>
        <p:submenu label="Non-Ajax Menuitem" icon="pi pi-clone">
            <p:menuitem value="Delete" action="#{menuView.delete}" update="messages" ajax="false" icon="pi pi-times" />
        </p:submenu>
        <p:separator />
        <p:submenu label="Navigations" icon="pi pi-home">
            <p:submenu label="Prime Links">
                <p:menuitem value="Prime" url="http://www.prime.com.tr" title="xxx" />
                <p:menuitem value="PrimeFaces" url="http://www.primefaces.org" />
            </p:submenu>
            <p:menuitem value="Mobile" />
        </p:submenu>
    </p:tieredMenu>

    <p:separator />

    <p:commandButton id="dynaButton" value="Show" type="button" icon="pi pi-home" />
    <p:tieredMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:200px">
        <p:submenu label="Ajax Menuitems">
            <p:menuitem value="Save" action="#{menuView.save}" update="messages" icon="pi pi-save" />
            <p:menuitem value="Update" action="#{menuView.update}" update="messages" icon="pi pi-refresh" />
        </p:submenu>
        <p:submenu label="Non-Ajax Menuitem">
            <p:menuitem value="Delete" action="#{menuView.delete}" update="messages" ajax="false" icon="pi pi-times" />
        </p:submenu>
        <p:submenu label="Navigations" icon="pi pi-home">
            <p:submenu label="Prime Links">
                <p:menuitem value="Prime" url="http://www.prime.com.tr" />
                <p:menuitem value="PrimeFaces" url="http://www.primefaces.org" />
            </p:submenu>
            <p:menuitem value="Mobile" />
        </p:submenu>
    </p:tieredMenu>
</h:form>