Set Target for content in header menu.
its_me May 12, 2011 11:43 AMHello All,
I am creating a small rich faces application which needs a header containing drop down menu and a constant footer. Each item in the drop down menu should be a separate screen. I created separate xhtml files for individual screens and the created a header.xhtml, footer.xhtml and main.xhtml. The main.xhtml file is created as a rich:page. The remaining ones are just like any other plain xhtml files with f:views and h:form. When I run the app, the main screen comes up fine. When I select an item in the header menu, the content should come in between the header and footer. The following is my drop down menu.
<rich:dropDownMenu>
<f:facet name="label">
<h:panelGroup> <h:outputText value="TRANSACTIONS"/>
</h:panelGroup>
</f:facet>
<rich:menuItem submitMode="none" onclick="document.location.href=myfile.jsf">
<h:outputLink value="myfile.jsf">
<h:outputText value="My Screen"></h:outputText>
</h:outputLink>
</rich:menuItem>
</rich:dropDownMenu>
Is there any way to make the contents of myfile.xhtml be displayed in the main.xhtml? The following are the contents of my main.xhtml
<rich:page 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"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
>
<f:facet name="header">
<h:panelGroup layout="block">
<ui:include src="header.xhtml" />
</h:panelGroup>
</f:facet>
<f:facet name="footer">
<h:panelGroup layout="block">
<ui:include src="footer.xhtml" />
</h:panelGroup>
</f:facet>
<h:outputText value="Welcome"/>
</rich:page>
Thanks and Regards,
Nid...............