Page 1 of 1

po:menu with ID

Posted: 16 May 2020, 19:40
by mario.adriano
I have a problem in the menu component of primefaces olympos that I did not allow changing the ID to refer to in a link.

layoutmenu.xhtml page

Code: Select all

xmlns:po"http://primefaces.org/olympos"

<po:menu class="active" id="layout-main" model = "#{menuMB.principalModel}" />
<po:menu class="active" id="personal layout" model = "#{menuMB.pessoalModel}" />
When I try to reference a link, it does not find these IDs (layout-main, layout-personal), as both menus are the same ID with the name "layout-menu"

layouttabmenu.xhtml page

Code: Select all

<a id="menu-principal" href="#" rel="layout-principal" />
<a id="menu-pessoal" href="#" rel="layout-pessoal" />

<ui: include src="layoutmenu.xhtml" />
Does anyone know a solution for setting the ID?

Re: po:menu with ID

Posted: 03 Jun 2020, 10:12
by mert.sincan
Hi,

Olympia or Olympos ?

Also, po:menu is a custom component for the layout. Therefore, it can not be used more than once in any menu page. On Olympos, you can change *MenuRenderer.java easily.

Best Regards,