Hi everyone,
I am using JSF 1.2, MyFaces 1.2.8, RichFaces 3.3.3.Final.
I would like to ask about panelMenu state holding between two page navigation.
Example:
I have two pages Page1 and Page2. And menu looks like:
MenuGroup1
Page1
MenuGroup2
Page2
Now for example I am on index page and menu is collapsed and looks like:
MenuGroup1
MenuGroup2
So I expand MenuGroup2 because I want to go to Page2 which is located under MenuGroup2.
Menu before click to Page2 looks like:
MenuGroup1
MenuGroup2
Page2
So now I will clik on Page2 and Page2 will be rendered.
But problem si that menu on Page2 is collpased like on index page and looks like:
MenuGroup1
MenuGroup2
But I want to hold state in menu and it should looks like:
MenuGroup1
MenuGroup2
Page2 (bold means selected)
I can achieve this beahavior only with binding panelMenu component to session scopead backing bean, but JSF depricate component binding to session scoped beans. I also have time to time some strange exceptions like DuplicateIdExcp, NoSuchElement excp, somethimes menu dissapear and so on. When I remove binding everything works fine, but I have problem with state holding.
Please, Can someone help me solve this problem.
I use <rich:panelMenu> like this
<h:form id="nav_form" styleClass="menu-panel">
<rich:panelMenu id="nav_menu" height="360px" mode="ajax"
expandSingle="true"
styleClass="Detail" expandMode="ajax" iconItem="none"
iconItemPosition="left" iconGroupTopPosition="right"
iconExpandedTopGroup="triangleDown" iconCollapsedTopGroup="triangle">
<rich:panelMenuGroup id="xxx1" rendered="#{xxx}"
label="#{xxx}">
<rich:panelMenuItem id="xxx2"
rendered="#{xxx}"
label="#{xxx}"
action="#{xxx}">
...
</h:form>