active p:menuitem in p:submenu

mert.sincan
Posts: 5045
Joined: 29 Jun 2013, 12:38

13 May 2022, 11:02

Hi,

Please see our restoreState method;

Code: Select all

restoreMenuState: function () {
        var link = $('a[href^="' + this.cfg.pathname + '"]'); // This line checks the url of anchor elements with browser's url.
        var $this = this;
        if (link.length) {
        ...
Could you please share the DOM structures of the elements with the 'om_dashboard' and 'om_useradmin' ids?
Exp;
in https://www.primefaces.org/poseidon

Code: Select all

<li id="menuform:om_formlayout" role="menuitem">
   <a href="/poseidon/formlayout.xhtml"><i class="pi pi-id-card layout-menuitem-icon"></i><span class="layout-menuitem-text">Form Layout</span></a>
   <div class="layout-menu-tooltip">
      <div class="layout-menu-tooltip-arrow"></div>
      <div class="layout-menu-tooltip-text">Form Layout</div>
   </div>
</li>
<li id="menuform:om_input" role="menuitem">
   <a href="/poseidon/input.xhtml"><i class="pi pi-check-square layout-menuitem-icon"></i><span class="layout-menuitem-text">Input</span></a>
   <div class="layout-menu-tooltip">
      <div class="layout-menu-tooltip-arrow"></div>
      <div class="layout-menu-tooltip-text">Input</div>
   </div>
</li>
Please see href attributes of <a> tags.

Best Regards,

Post Reply

Return to “Poseidon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests