Is there a way to control what <p:menuitem> is selected, appart from clicking on it?
When a item is selected i see there are 2 classes added to my <a href> "active-menu" and "active-menu-restore added" but is there some attribute I can add to my <p:menuitem> to make it selected?
Code: Select all
<pr:menu>
<p:submenu id="rm_errand_tl" label="Ärende" icon="fa fa-briefcase">
<p:menuitem id="rm_errand_overview" value="Översikt" icon="fa fa-list" outcome="/errand-list" />
<p:menuitem id="rm_errand_new" value="Skapa nytt" icon="fa icon-file-add" outcome="/errand-create" />
</p:submenu>
<p:menuitem id="rm_address" value="Adress" icon="fa icon-mail" outcome="/address" rendered="#{menuView.isErrandSelected}" />
<p:menuitem id="rm_general_meeting" value="Övrigt" icon="fa fa-newspaper-o" outcome="/nan" rendered="#{menuView.isErrandSelected}" />
</pr:menu>