2 Replies Latest reply on Mar 16, 2010 4:11 AM by Ilya Shaikovsky

    <rich:panelMenuGroup selection issue

    Sandeep Gowda Newbie
      Hi,
      I am working in JSF web applications using Richfaces & Facelets, I have attached the .xhtml below and also Java bean class.
      Usecase is on the every menu selection i need to dynamically change the include file on the right side of the view. i was able to set new values on each selection of menus throught java bean, but the file/right panel is not getting rendered.

      please help me.

      regards
      Sandeep

      <html xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich">
            <head>
                  <title>Customer Details</title>
                  <meta http-equiv="keywords" content="enter,your,keywords,here" />
                  <meta http-equiv="description"
                        content="A short description of this page." />
                  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

                  <style>
      .cols {
            vertical-align: top;
            width: 50%;
      }
      </style>
            </head>

            <body>
                  <h:form id="form">
                        <h:panelGrid columns="2" columnClasses="cols" width="100%">
                              <rich:panelMenu style="width:200px" mode="ajax"
                                    iconExpandedGroup="disc" iconCollapsedGroup="disc"
                                    iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
                                    iconCollapsedTopGroup="chevronDown">
                                    <rich:panelMenuGroup label="Asset and Liability ">
                                          <rich:panelMenuItem label="Asset"
                                                action="#{MainPanel.onAssetSelection}" reRender="selectedPanel">
                                                <f:param name="strCurrent" value="/Jsf/UpdatePayment.xhtml" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuItem label="Liability"
                                                action="#{MainPanel.onLiabilitySelection}"
                                                reRender="selectedPanel">
                                                <f:param name="strCurrent" value="/Jsf/SearchCustomer.xhtml" />
                                          </rich:panelMenuItem>
                                    </rich:panelMenuGroup>
                                    <rich:panelMenuGroup label="Group 2">
                                          <rich:panelMenuItem label="Item 2.1">
                                                <f:param name="strCurrent" value="Item 2.1" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuItem label="Item 2.2">
                                                <f:param name="strCurrent" value="Item 2.2" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuItem label="Item 2.3">
                                                <f:param name="strCurrent" value="Item 2.3" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuGroup label="Group 2.4">
                                                <rich:panelMenuItem label="Item 2.4.1">
                                                      <f:param name="strCurrent" value="Item 2.4.1" />
                                                </rich:panelMenuItem>
                                                <rich:panelMenuItem label="Item 2.4.2">
                                                      <f:param name="strCurrent" value="Item 2.4.2" />
                                                </rich:panelMenuItem>
                                                <rich:panelMenuItem label="Item 2.4.3">
                                                      <f:param name="strCurrent" value="Item 2.4.3" />
                                                </rich:panelMenuItem>
                                          </rich:panelMenuGroup>
                                          <rich:panelMenuItem label="Item 2.5">
                                                <f:param name="strCurrent" value="Item 2.5" />
                                          </rich:panelMenuItem>
                                    </rich:panelMenuGroup>
                                    <rich:panelMenuGroup label="Group 3">
                                          <rich:panelMenuItem label="Item 3.1">
                                                <f:param name="strCurrent" value="Item 3.1" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuItem label="Item 3.2">
                                                <f:param name="strCurrent" value="Item 3.2" />
                                          </rich:panelMenuItem>
                                          <rich:panelMenuItem label="Item 3.3">
                                                <f:param name="strCurrent" value="Item 3.3" />
                                          </rich:panelMenuItem>
                                    </rich:panelMenuGroup>
                              </rich:panelMenu>
                              <h:panelGrid id="selectedPanel">
                                    <rich:panel bodyClass="rich-laguna-panel-no-header">
                                          <a4j:outputPanel  ajaxRendered="true">
                                                <ui:include src="#{MainPanel.strSelectedPath}"></ui:include>
                                                <h:outputText value="#{MainPanel.strSelectedPath}" id="Current" />
                                          </a4j:outputPanel>

                                    </rich:panel>
                                   
                              </h:panelGrid>

                        </h:panelGrid>
                  </h:form>
            </body>
      </html>