Menu - SlideMenu

SlideMenu displays nested submenus with a slide animation.

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

    <p:slideMenu 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}"  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" />
                <p:menuitem value="PrimeFaces" url="http://www.primefaces.org" />
            </p:submenu>
            <p:menuitem value="Mobile" />
        </p:submenu>
    </p:slideMenu>
    
    <p:separator />

    <p:commandButton id="dynaButton" value="Show" type="button" icon="pi pi-home"/>
    <p:slideMenu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:180px">
        <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}"  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:slideMenu>
</h:form>