I have this piece of code that upload files:
<p:dialog id="addFileDialog" 
              header="#{text['tasksbacking.attach.addFile']}" 
              widgetVar="addfile"
              height="500"
              width="500"
              closeOnEscape="true" 
              resizable="false" 
              draggable="false"                                            
              fitViewport="true"
              modal="true" 
              appendTo="@(body)">
 <h:form enctype="multipart/form-data">
       <p:fileUpload  fileUploadListener="#{attachmentsComponent.handleFileUpload}" 
                      mode="advanced" 
                      multiple="true" 
                      dragDropSupport="true"
                      allowTypes="/(\.|\/)(gif|jpe?g|png|pdf|doc|docx|txt)$/"
                      label="#{text['tasksbacking.addFile.choose']}"
                      uploadLabel="#{text['tasksbacking.addFile.upload']}"
                      cancelLabel="#{text['tasksbacking.addFile.cancel']}"/>
  </h:form>
  <p:ajax event="close" 
          update=":#{cc.clientId}:addFileDialog,:#{cc.clientId}:formAttachForm:attachTree,:#{cc.clientId}:formAttachForm:msgTreeAction,:#{cc.clientId}:attachContainer" listener="#{attachmentsComponent.onCloseUpload}"/>
</p:dialog>
With this code, I can upload files when I close the dialog. But I cannot execute another AJAX action, without refreshing the page. The other actions execute well when I don't upload files as the first action.
What could be the problem to execute the forward actions without refreshing the page? The enctype of the form could be the problem?
 
     
     
    