title: p:fileUpload Listener method is never invoked for mode="simple"
body: <p>I am using <code>p:fileUpload</code> but the fileUploadListener is not getting invoked if I use <code>mode="simple"</code> . Is there any way to use fileUploadListener in simple mode.</p>
  
  <pre><code>&lt;p:fileUpload id ="uploading"
                fileUploadListener="#{workflowActionTemplate.handleFileUpload}"
                mode="simple" 
                update="messages"
                sizeLimit="100000" 
                allowTypes="/(\.|\/)(gif|jpe?g|png|pdf)$/"
                multiple="true"/&gt;
  </code></pre>
  
  <p>Prime faces : 3.2</p>
  
  <p>I have done following configuration, please let me know if I am missing anything.</p>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;!-- File Upload filter --&gt;
  &lt;filter&gt;
  &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
  &lt;filter-class&gt;org.primefaces.webapp.filter.FileUploadFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
  &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
  &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;!-- Dependancy for file upload --&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
  &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
  &lt;version&gt;1.2&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
  &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
  &lt;version&gt;3.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>listener Method:</p>
  
  <pre><code>public void handleFileUpload(FileUploadEvent event) {
    FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded."); System.out.println("msg : "+ msg);
    uploadedFile = event.getFile();
  }
  </code></pre>
  
  <p>--</p>
  
  <p>If I use value attribute instead of fileUploadListener and if I don't upload the file, then 
  the fileUpload attribute not getting set and so it gives following error.</p>
  
  <p><code>javax.faces.component.UpdateModelException: javax.el.ELException: /search/workflowAction.xhtml @181,104 value="#{workflowActionTemplate.uploadedFile}": Can't set property 'uploadedFile' of type 'org.primefaces.model.UploadedFile' on class 'com.principal.nq.statements.search.WorkflowActionTemplate$$EnhancerByCGLIB$$6ebcb7eb' to value ''</code></p>
  
  <p><strong>Update</strong></p>
  
  <p>As fileUploadListener is not working I was also trying to use ajax call in the following way to update the file value. But <code>f:ajax</code> is not able to execute Primefaces <code>p:fileUpload</code> component. I also tried with <code>p:ajax</code> but that is also not working.</p>
  
  <pre><code>&lt;p:fileUpload id="uploading"
                value="#{workflowActionTemplate.uploadedFile}"
                mode="simple"
                update="messages"
                sizeLimit="100000" 
                allowTypes="/(\.|\/)(gif|jpe?g|png|pdf)$/"
                auto="true"/&gt;
  &lt;p:growl id="messages" showDetail="true"/&gt;
  &lt;h:commandButton id="uploadDocument" styleClass="continuebutton" value="#{msg.upload}" action="#{workflowActionTemplate.uploadParticipantCustomDoc}"&gt;
    &lt;f:ajax execute="uploading" render="uploadDocumentDlg" onevent="onAjaxUploadCustomDoc"/&gt;
  &lt;/h:commandButton&gt;
  </code></pre>