p:menu with nested p:submenu

UI Components for JSF
Post Reply
lfraysse
Posts: 5
Joined: 29 Jun 2018, 10:16

22 Nov 2021, 20:23

I've a menu tree with the following structure :

<p:menu toggleable="true" styleClass="mainmenu" style="width:100%;">
<p:submenu label="#{msg.system_repository}" rendered="#{navigationBean.repositoryFeatureEnabled}" toggleable="true">
<p:submenu label="#{msg.Entities}" style="padding-left:25px;">
<p:menuitem value="#{msg.Collections}" target="content" outcome="/pages/repository/repository_collections.faces"
onclick="return switchLink(this, '#{msg.Collections}')" style="padding-left:35px;" />
</p:submenu>
<p:submenu label="#{msg.Admin_Files}" style="padding-left:25px;">
<p:menuitem value="#{msg.Resource_Locators}" target="content" outcome="/pages/repository/repository_resource_locators.faces"
onclick="return switchLink(this, '#{msg.Resource_Locators}')" style="padding-left:35px;" />
<p:menuitem value="#{msg.Variable_Sets}" target="content" outcome="/pages/repository/repository_variable_set.faces"
onclick="return switchLink(this, '#{msg.Variable_Sets}')" style="padding-left:35px;" />
</p:submenu>
<p:menuitem value="#{msg.Variations}" target="content" outcome="/pages/repository/repository_variations.faces"
onclick="return switchLink(this, '#{msg.Variations}')" style="padding-left:35px;" />
</p:submenu>
</p:menu>

I've different issue:
- when i click on {msg.system_repository} it doesn't collapse/expand the 2 sub menu {msg.Entities} and {msg.Admin_Files}
- When I collapse/expand {msg.Admin_Files}, {msg.Variations} is also collapse.

What I'm doing wrong ? Isn't it possible to make a submenu under a submenu working the same ?

I'm using Primefaces 10.0.0

Thanks for any help.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests