Multiple pv:menu's doesn't work

Post Reply
Posts: 4
Joined: 29 Jun 2015, 15:53

10 Aug 2017, 14:51

Hi all,

I need to add two different pv:menus on one page.
But when I do that, he loads and runs the layout.js twice and the submenu of the second menu isn't working.

I use the first menu as a main menu and the second menu as as submenu inside the page.

Code example:

Code: Select all

        <div class="layout-wrapper #{guestPreferences.slimMenu ? 'layout-menu-slim' : (guestPreferences.overlayMenu ? 'layout-menu-overlay' : 'layout-menu-static')} #{showMenu ? 'layout-submenu-static' : ''}">
            <ui:include src="./topbar.xhtml" />

            <div class="layout-main">
                <ui:include src="./menu.xhtml" />

                <ui:insert name="submenu"/>

                <div class="layout-content">
                   	<ui:insert name="content"/>

                <ui:include src="./footer.xhtml" />

Code: Select all

	<ui:define name="submenu">
		<div class="layout-submenu-wrapper">
			<div class="submenu-content">
				<pv:menu widgetVar="subMenuVar">
					<p:menuitem id="pm_demo1" value="Demo 1" icon="fa fa-home"	outcome="/dashboard" />
					<p:menuitem id="pm_demo2" value="Demo 2" icon="fa fa-home"	outcome="/dashboard" />
					<p:menuitem id="pm_demo3" value="Demo 3" icon="fa fa-home"	outcome="/dashboard" />
                            <p:submenu id="pm_hierarchy" label="Menu Hierarchy" icon="fa fa-gg">
                                <p:submenu id="pm_sm1" label="Submenu 1" icon="fa fa-sign-in">
                                    <p:submenu id="pm_sm11" label="Submenu 1.1" icon="fa fa-sign-in">
                                        <p:menuitem id="pm_lnk111" value="Link 1.1.1" icon="fa fa-sign-in" url="#" />
                                        <p:menuitem id="pm_lnk112" value="Link 1.1.2" icon="fa fa-sign-in" url="#" />
                                        <p:menuitem id="pm_lnk113" value="Link 1.1.3" icon="fa fa-sign-in" url="#" />
                                    <p:submenu id="pm_sm12" label="Submenu 1.2" icon="fa fa-sign-in">
                                        <p:menuitem id="pm_lnk121" value="Link 1.2.1" icon="fa fa-sign-in" url="#" />
                                <p:submenu id="pm_sm2" label="Submenu 2" icon="fa fa-sign-in">
                                    <p:submenu id="pm_sm21" label="Submenu 2.1" icon="fa fa-sign-in">
                                        <p:menuitem id="pm_lnk211" value="Link 2.1.1" icon="fa fa-sign-in" url="#" />
                                        <p:menuitem id="pm_lnk212" value="Link 2.1.2" icon="fa fa-sign-in" url="#" />
                                    <p:submenu id="pm_sm22" label="Submenu 2.2" icon="fa fa-sign-in">
                                        <p:menuitem id="pm_lnk221" value="Link 2.2.1" icon="fa fa-sign-in" url="#" />
If I use p:menu instead it works but the then the paradise-layout does not fit.

What can I do?


Posts: 4079
Joined: 29 Jun 2013, 12:38

14 Aug 2017, 10:26


pv:menu is a special component for Paradise Layout. For now, it does not support more than one usage.


Post Reply

Return to “Paradise - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest