0 Replies Latest reply on Nov 2, 2007 10:02 AM by Krzysztof Kalinowski

    panelMenu

    Krzysztof Kalinowski Newbie

      I try to use session bean and selectedChild arribute to pass information about selected item between pages.
      I see correct value by #{PanelMenu.activeItem} on page but all items in panelMenu are collapsed (after click on item panelMenu).
      It doesn't work. Why?


      <h:outputText value="#{PanelMenu.activeItem}"/>
       <rich:panelMenu expandMode="server" selectedChild="#{PanelMenu.activeItem}">
       <rich:panelMenuGroup label="item 1">
       <rich:panelMenuItem id="item11" name="item11" label="item 1.1" value="item11" action="#{PanelMenu.Item11}">
       </rich:panelMenuItem>
       <rich:panelMenuItem id="item12" name="item12" label="item 1.2" value="item12" action="#{PanelMenu.Item12}">
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuGroup label="item 2">
       <rich:panelMenuItem name="item21" label="item 2.1" value="item2.1">
       </rich:panelMenuItem>
       <rich:panelMenuItem name="item22" label="item 2.2" value="item2.1">
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       </rich:panelMenu>
      


      @Name("PanelMenu")
      @Scope(ScopeType.SESSION)
      public class PanelMenuBean {
       private String activeItem=null;
      
      public PanelMenuBean() {
      }
      
      public String getActiveItem() {
       return activeItem;
      }
      
      public void setActiveItem(String activeItem) {
       this.activeItem = activeItem;
      }
      
      public String Item11(){
       activeItem = "item11";
       return "/item1.xhtml";
      }
      
      public String Item12(){
       activeItem = "item12";
       return "/item2.xhtml";
      }
      
      @Remove
      public void Destroy(){
      }
      
      }