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.
No your code is wrong. You can't work from include based wizard using outside a4j controls. But you may use simple ui:include with EL binded src attrivute and reRender it with new value.