I have a page layout with p:layout tag. I load from the "west" unit, where my navigation is defined, dynamically the content pages.
index.xhtml:
<html 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:p="http://primefaces.org/ui">
<h:head>
    <title>upload</title>
</h:head>
<h:body>
    <p:layout fullPage="true">
        <p:layoutUnit position="north" size="130"  resizable="false" closable="false" collapsible="false">
            <h:graphicImage value="resources/image.png" styleClass="logo" />
        </p:layoutUnit>
        <p:layoutUnit position="west" size="150" resizable="false" closable="false" collapsible="false">
           <h:form id="form2">
               <f:ajax render=":centerContentPanel" execute="@this">
                   <li><h:commandLink value="My Data" action="#{navigationBean.doNav('mydata')}" /></li>
                   <li><h:commandLink value="Upload" action="#{navigationBean.doNav('upload')}" /></li>
                </f:ajax>
            </h:form>
        </p:layoutUnit>
        <p:layoutUnit id="cent" position="center" resizable="false" closable="false" collapsible="false">
                <h:panelGroup id="centerContentPanel">
                    <ui:include src="#{navigationBean.pageName}.xhtml" />
                </h:panelGroup>
        </p:layoutUnit>
        <p:layoutUnit position="south" size="60"  resizable="false" closable="false" collapsible="false">
        </p:layoutUnit>
    </p:layout>
</h:body>
And a page for file uploading:
upload.xhtml
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:form enctype="multipart/form-data">
    <p:fileUpload value="#{fileUploadView.file}" fileUploadListener="#{fileUploadBean.handleFileUpload}" mode="advanced" dragDropSupport="false"
                  multiple="true" update="@this" sizeLimit="100000" fileLimit="3" />
    <p:growl id="messages" showDetail="true" />
</h:form>   
<br />
There is a strange behaviour: The loading of the content pages like upload.xhtml works as expected but if i try to uplade a file (ore more) it won't work, the bean will not called. If i try it a second time, then it works ?????
If i replace the f:ajax component in index.xhtml and the h:commandLink components with a h:commandButton with the update=":centerContentPanel" then the file upload works also as expected. But i don't want to have commandButtons.
How can i fix this that i can work with commandLinks?
Thanks in advance
 
    