2 Replies Latest reply on Aug 2, 2008 12:53 PM by Ortwin Rose

    How to keep the expanded state of a panelMenuGroup

    Ortwin Rose Newbie

      Hi group

      I'm new to RichFaces but after a couple of hours searching
      and testing I need a hint where to look.

      I'm not able to keep the panelMenuGroup expanded state.
      The group is used to the left of the page and should show
      the current navigation.
      It seems that a page reload is collapsing the complete tree.
      Can someone point me to an example or give an advice?

      Thanks in advance
      Wolfgang R.

      <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
       <title>SuCESRFID</title>
       <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
      </head>
      
      <body>
      
       <ui:include src="menu.xhtml">
       <ui:param name="projectName" value="SuCESRFID"/>
       </ui:include>
      
       <table>
       <tr>
       <td width="20%" valign="top">
       <ui:include src="navigation.xhtml">
       <ui:param name="projectName" value="SuCESRFID"/>
       </ui:include>
       </td>
       <td width="80%">
       <div class="body">
       <ui:insert name="body"/>
       </div>

      ...
      <rich:panelMenu
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       style="width:200px" submitMode="ajax"
       iconExpandedGroup="disc" iconCollapsedGroup="disc"
       iconExpandedTopGroup="chevronUP" iconGroupTopPosition="right"
       iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right" >
       <rich:panelMenuGroup label="#{messages['navigation.monitoring']}" rendered="#{s:hasRole('all')}">
       <rich:panelMenuItem label="#{messages['navigation.stationary']}" action="#{navigate.showPage('filterInfrastructure')}">
       <f:param name="current" value="item1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="#{messages['navigation.mobile']}" action="#{navigate.showPage('filterMobileInfrastructure')}">
       <f:param name="current" value="item1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="#{messages['navigation.mes']}" action="#{navigate.showPage('filterMESInterface')}">
       <f:param name="current" value="item1"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
      ....