how to highlight <p:menuitem>

Post Reply
Posts: 2
Joined: 11 Oct 2015, 17:48

03 Jun 2018, 20:27

i create menu

Code: Select all

<pc:menu widgetVar="me" >
    <p:menuitem id="om_users" value="Users" icon="fa fa-users" outcome="/app/users"/>
    <p:menuitem id="om_files" value="Videos" icon="fa fa-copy" outcome="/app/videos"/>
but after start i have active item Videos (last item), i want to active first item.

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

11 Jun 2018, 08:13

You can add 'active-menuitem' class to a menuitem. OR we use cookie to highlight a menuitem after refreshing page, logout/login etc. Maybe, you can use it. Exp;

Code: Select all

var menuWidget = PF('me');

Post Reply

Return to “California - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests