How to Get the Primefaces Megamenu Vertical

Asked

Viewed 400 times

1

I’m having a little problem with the Megamenu of Primefaces, I’m not able to leave it upright. I’m making a code to test, which follows below:

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

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

1 answer

2


It seems the attribute orientation only works properly on newer versions of Primefaces.

I tested with 5.3 (Community) and it didn’t work.

I tested with 5.3.6 (Elite) and is ok!

  • That’s right, I’m using Maven and I was using <version>5.0</version>, I changed to the most current version and gave it right. Thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.