Page 1 of 1

p:submenu don't expanding and collapsing after update on parent element

Posted: 01 Aug 2018, 18:32
by MaxVP
When loading the page the "p:submenu" works correctly, however, after performing an update on the "p:outputPanel" where it is "parent element", simply stops working, the submenu don't expand and collapse.

"Expanding and collapsing" only works again if you refresh the page.

Menu:

Code: Select all

<p:outputPanel id="layout-sidebar" layout="block">
    <h:form id="menuform">
        <pm:menu>
            <p:menuitem id="dashboard"/>
            <p:submenu id="sss" label="sss" icon="sss">
                <p:menuitem value="ttt" icon="ttt"/>
                <p:menuitem value="uuu" icon="uuu"/>
                <p:menuitem value="vvv" icon="vvv"/>
            </p:submenu>
            <p:submenu id="www" label="www" icon="www">
                <p:menuitem value="xxx" icon="xxx"/>
                <p:menuitem value="yyy" icon="yyy"/>
                <p:menuitem value="zzz" icon="zzz"/>
            </p:submenu>
        </pm:menu>
    </h:form>
</p:outputPanel>
Button that performs update:

Code: Select all

<p:commandLink title="xxx" actionListener="#{xxx.yyy}" update="layout-sidebar"></p:commandLink>

Any solution?
Thanks

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 01 Aug 2018, 20:16
by MaxVP
I just checked, if you use the default menu of Primefaces "p:menubar" the problem does not exist, it works 100%, so the bug/problem is in the custom menu of the Serenity "pm:menu" template.

Please do the correction quickly.

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 02 Aug 2018, 13:00
by huseyinT
pm:menu is a special component for serenity.

You should use this component in the sidebar.xhtml.

You don't use different pages.

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 03 Aug 2018, 13:27
by Melloware
It looks like he is using it in the sidebar.xhtml? Shouldn't the component be able to be updated so it can change its rendered flags etc?

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 03 Aug 2018, 16:43
by MaxVP
Yes, the pm: menu is being used in the sidebar.xhtml as it is presented in the showcase and the sample files that came with the template.

Even if the sidebar and topbar are rendered, they will not work again, only with the refresh of the "F5" page, in addition to the sidebar submenus no longer expanding and collapsing, topbar items also stop expanding and collapsing.


It's been three days since I detected the problem and reported here and so far no response or analysis from the template developer team, again disappointed with the after sales support.

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 07 Aug 2018, 15:08
by huseyinT
I add code 'off('click') in the layout.js, line 229 :

Code: Select all

$(document.body).off('click').on('click', function() {

Could you add to try this?

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 08 Aug 2018, 21:57
by MaxVP
huseyinT wrote:
07 Aug 2018, 15:08
I add code 'off('click') in the layout.js, line 229 :

Code: Select all

$(document.body).off('click').on('click', function() {

Could you add to try this?
It worked, solved my problem, thank you very much.

It's a shame that the Template developers do not interact with customers in order to solve the problems and terms that we ourselves go after solutions to fix the bugs.

It's been seven days now, and the template developer has not even given a response.

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 08 Aug 2018, 21:59
by Melloware
Well to be fair @huseyinT works for PrimeTek I believe...

Re: p:submenu don't expanding and collapsing after update on parent element

Posted: 09 Aug 2018, 08:06
by huseyinT
You are welcome.

I'm working as PrimeTek team member.

This issue was a complex build, so it took a long time.

Orange users is a PrimeTek Team Developers.

We are following in here, we help solving customer issues.

Thank you @Melloware

Greetings,