1 Reply Latest reply on Jul 7, 2007 7:19 AM by ilya_shaikovsky

    rich:dropDownMenu and a4j:include to avoid rendering the men

    haoues01

      Hello,

      I am struggling now to find a solution which allows me to to keep the menu (included only in my main page) and to change only the body part of my main page, using as possible the standard navigation rule provided by JSF. I really want to minimize the number of page and code and avoid to include each time the same menu ... and mainly to optimize ajax request and data posted to the server.

      main page (main.jsp) :
      ... <!-- the menu I want to keep -->
      <rich:toolBar itemSeparator="line" >
      <rich:dropDownMenu value="Members" >
      <rich:menuItem value="Add" ajaxSingle="true" reRender="wizard" action="test_panelgrid" ...
      ... </rich:menuItem>
      <rich:dropDownMenu>
      </rich:toolBar>
      ......

      <!-- the body content where the page test_panelgrid must be included -->
      <h:panelGroup id="wizard">
      <a4j:include viewId="login.jsp"/>
      </h:panelGroup>
      ....

      the faces-xml:

      ....
      <navigation-rule>
      <navigation-case>
      <from-outcome>test_panelgrid</from-outcome>
      <to-view-id>/test_panelgrid.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>
      ...

      Thanks in advance for any advice.