0

I have a index.xhtml as a primefaces. and 2 other pages.xhtml, I want 2 links in header, when I clicc on this links i still in the same page and content of 2 pages display on the center of pages 'p:layoutUnit position="center"'

<f:view contentType="text/html">
    <h:head>
        <f:facet name="first">
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
            <title>PrimeFaces</title>
        </f:facet>
    </h:head>

    <h:body>

        <p:layout fullPage="true">

            <p:layoutUnit position="north" size="100" resizable="true" closable="true" collapsible="true">
                <ui:include src="header.xhtml" />
            </p:layoutUnit>

            <p:layoutUnit position="south" size="100" closable="true" collapsible="true">
                Footer

            <p:layoutUnit position="center">
               i want 2 other pages.xhtml page be just here
            </p:layoutUnit>

        </p:layout>

    </h:body>

</f:view>

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
  • If you only want to include them and not show them without the main page you should take a look at ui:include: http://stackoverflow.com/questions/4792862/how-to-include-another-xhtml-in-xhtml-using-jsf-2-0-facelets – lastresort Mar 24 '17 at 08:07
  • no, not that , i mean single page application and when i clic this link it display in – Hamza BELHADJ Mar 24 '17 at 08:10

0 Answers0