title: ajaxified file upload in jsf
body: <p>I want to do a file upload without posting an entire form. The file upload works fine, but the whole form is submitted. This works fine when validation is correct. But when p.e. a required field is empty, the upload does not work and a error message is returned (required field missing)
  So i tried to ajax the file upload (ajax=true). But then the upload does nothing. </p>
  
  <p>I tried a work around bu putting the file upload and other fields in different forms. This works, but the result is that data you changed in the other fields is disregarded when doing the file upload.</p>
  
  <p>Any suggestions?</p>
  
  <p>Here is my code I use:</p>
  
  <pre><code>&lt;t:inputFileUpload id="fileupload" value="#{prospectDetail.upFile}" size="50" /&gt;
  &lt;h:outputLabel for="description" value="#{msg.prospectdetail_description}"/&gt;
  &lt;mw:inputText id="description" size="40" value="#{prospectDetail.fileDescription}" /&gt;
  &lt;p:commandButton styleClass="button" value="#{msg.common_upload}" action="#{prospectDetail.upload}" ajax="false" process="@form" onbegin="busyPopup.show()" oncomplete="busyPopup.hide();"/&gt;
  </code></pre>