Menu - MegaMenu MegaMenu displays submenus of root items together.
Horizontal
Vertical
<h:form id="form">
    <h:panelGrid columns="2" cellpadding="5">
        <p:outputLabel for="orientation" value="Orientation:" />
        <p:selectOneButton id="orientation" value="#{megaMenuView.orientation}" onchange="$('#form').submit()">
            <f:selectItem itemLabel="Horizontal" itemValue="horizontal" />
            <f:selectItem itemLabel="Vertical" itemValue="vertical" />
        </p:selectOneButton>
    </h:panelGrid>
</h:form>

<p:megaMenu orientation="#{megaMenuView.orientation}" style="margin-top:20px">
    <p:submenu label="TV" icon="ui-icon-check">
        <p:column>
            <p:submenu label="TV.1">
                <p:menuitem value="TV.1.1" url="#" />
                <p:menuitem value="TV.1.2" url="#" />
            </p:submenu>
            <p:submenu label="TV.2">
                <p:menuitem value="TV.2.1" url="#" />
                <p:menuitem value="TV.2.2" url="#" />
                <p:menuitem value="TV.2.3" url="#" />
            </p:submenu>
        </p:column>

        <p:column>
            <p:submenu label="TV.4">
                <p:menuitem value="TV.4.1" url="#" />
                <p:menuitem value="TV.4.2" url="#" />
            </p:submenu>
            <p:submenu label="TV.5">
                <p:menuitem value="TV.5.1" url="#" />
                <p:menuitem value="TV.5.2" url="#" />
                <p:menuitem value="TV.5.3" url="#" />
            </p:submenu>
        </p:column>

        <p:column>
            <strong>Image</strong>
            <p:graphicImage name="/demo/images/nature/nature1.jpg" width="200"/>
        </p:column>
    </p:submenu>

    <p:submenu label="Sports" icon="ui-icon-document">

        <p:column>
            <p:submenu label="Sports.1">
                <p:menuitem value="Sports.1.1" url="#" />
                <p:menuitem value="Sports.1.2" url="#" />
            </p:submenu>
            <p:submenu label="Sports.2">
                <p:menuitem value="Sports.2.1" url="#" />
                <p:menuitem value="Sports.2.2" url="#" />
                <p:menuitem value="Sports.2.3" url="#" />
            </p:submenu>
        </p:column>

        <p:column>
            <p:submenu label="Sports.4">
                <p:menuitem value="Sports.4.1" url="#" />
                <p:menuitem value="Sports.4.2" url="#" />
            </p:submenu>
            <p:submenu label="Sports.5">
                <p:menuitem value="Sports.5.1" url="#" />
                <p:menuitem value="Sports.5.2" url="#" />
                <p:menuitem value="Sports.5.3" url="#" />
            </p:submenu>
        </p:column>
        <p:column>
            <p:submenu label="Sports.7">
                <p:menuitem value="Sports.7.1" url="#" />
                <p:menuitem value="Sports.7.2" url="#" />
            </p:submenu>
        </p:column>
    </p:submenu>

    <p:submenu label="Entertainment" icon="ui-icon-pencil">
        <p:column>
            <p:submenu label="Entertainment.1">
                <p:menuitem value="Entertainment.1.1" url="#" />
                <p:menuitem value="Entertainment.1.2" url="#" />
            </p:submenu>
            <p:submenu label="Entertainment.2">
                <p:menuitem value="Entertainment.2.1" url="#" />
                <p:menuitem value="Entertainment.2.2" url="#" />
                <p:menuitem value="Entertainment.2.3" url="#" />
            </p:submenu>
        </p:column>

        <p:column>
            <p:submenu label="Entertainment.4" icon="ui-icon-help">
                <p:menuitem value="Entertainment.4.1" url="#" />
                <p:menuitem value="Entertainment.4.2" url="#" />
            </p:submenu>
            <p:submenu label="Entertainment.5">
                <p:menuitem value="Entertainment.5.1" url="#" />
                <p:menuitem value="Entertainment.5.2" url="#" />
                <p:menuitem value="Entertainment.5.3" url="#" />
            </p:submenu>
        </p:column>
    </p:submenu>

    <p:submenu label="Tech" icon="ui-icon-contact">
        <p:column>
            <p:submenu label="Tech.1">
                <p:menuitem value="Tech.1.1" url="#" />
                <p:menuitem value="Tech.1.2" url="#" />
            </p:submenu>
            <p:submenu label="Tech.2">
                <p:menuitem value="Tech.2.1" url="#" />
                <p:menuitem value="Tech.2.2" url="#" />
                <p:menuitem value="Tech.2.3" url="#" />
            </p:submenu>
        </p:column>

        <p:column>
            <p:submenu label="Tech.4">
                <p:menuitem value="Tech.4.1" url="#" />
                <p:menuitem value="Tech.4.2" url="#" />
            </p:submenu>
        </p:column>
    </p:submenu>

    <p:menuitem value="Quit" url="http://www.primefaces.org" icon="ui-icon-close" />
</p:megaMenu>
                
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.1.4 on Mojarra-2.2.10.