extended attribute in subMenu not counted

I have panelMenu with some submenus within which the extended attribute is controlled based on a bean. The problem is that the advanced status of the various submenus seems to be cached by the browser depending on the previous state of each submenu the previous time the user was at that URL, ignoring the logical state set for the extension. The behavior is the same with p: panelMenu and p: menu.

You can reproduce the problem in the PF project by adding the following code to the jsf page. No bean support required. When you first load the page, the submenu in the middle will look minimized. After a short playback of the menu, if the page is reloaded, the extended attribute is no longer taken into account, and the way the page is displayed corresponds to the last configuration that the user had in the browser.

<h:form>
    <p:panelMenu toggleable="true">
        <p:submenu label="No expandido" expanded="false">
            <p:menuitem value="External" url="http://www.primefaces.org"/>
        </p:submenu>
        <p:submenu label="Expandido" expanded="true">
            <p:menuitem value="External" url="http://www.primefaces.org"/>
        </p:submenu>
        <p:submenu label="No expandido" expanded="false">
            <p:menuitem value="External" url="http://www.primefaces.org"/>
        </p:submenu>
    </p:panelMenu>
</h:form>

Listening to the manual, this behavior is not expected:

           expanded - false - Boolean - Defines the state of submenu.

... and, according to a post by Cagatay on the PF forum, panelMenu is ready to use the extended attribute.

Question: I'm there a way to set the status extended / not extended from subMenu elements inside the Menu panel or menu ?

Thanks for any comments / suggestions / workarounds.

Charts 5.2 | Tomcat 7.0.X | Chrome + IE11

+4
2

stateful menuMenu:

<p:panelMenu stateful="false">

cookie.

+2

, , f:metadata f:viewAction. , .

0

All Articles