I found some posts by BalusC (big fan of urs) and others here on stack overflow and haven't found the solution, which would seem like something many would want to be able to do.
If I have a facelets/templating structure like this, a left navigation with links that drive what gets shown in main content area, but without doing a complete page refresh, I just want the main area to update, how do I do this?
------------------------------------- | link1 | show content for link1 | | link2 | when link1 is clicked | | link2 | in left navigation area | | | | -------------------------------------
I see the primefaces showcase does a whole page refresh when clicking menu items on left, and oddly enough, the richfaces4 showcase does not, although I am looking at the code can't understand just yet. is there a example out there that can show me how to do this?
here is my code
uiTemplate.xhtml (main template)
<div>
<div id="left">
<ui:include src="navigationMenu.xhtml"/>
</div>
<div id="center_content" class="center_content">
<ui:insert name="center_content" />
</div>
</div>
then my navigationMenu.xhtml looks like
<ui:composition>
<rich:collapsiblePanel header="ClickMe" switchType="client">
<h:link outcome="page1" value="goto page1" /><br />
<h:link outcome="page2" value="goto page2" /><br />
<h:link outcome="page3" value="goto page3" /><br />
</rich:collapsiblePanel>
</ui:composition>
and one of the pages which will appear in center content area, hopefully loaded without a complete refresh of all sections.
I would think I am going to need some f:ajax tag or use h:commandLink for these links above but just haven't found a good example. I see a bunch posts about Mojarra 2.1.x fixing dynamic includes but not sure that is related to this, unless that's is the only way to accomplish this.
page1.xhtml
<ui:composition template="./uiTemplate.xhtml">
<ui:define name="center_content">
page 1 content
</ui:define>
</ui:composition>