PrimeFaces File Upload component hack
If PrimeFaces file upload does not work, mostly the reason will be that the prependId attribute was not set to false in the h:form. After the user browses the file nothing happens and we are left wondering as there is no JavaScript error.
I have configured the PrimeFaces file upload as below in one of my UI page.
<h:form id="myform" enctype="multipart/form-data" prependId="false">
<p:fileUpload fileUploadListener="#{userprofile.handleFileUpload}"
allowTypes="*.jpg;*.png;*.gif;" description="User Profile Image"/>
</h:form>
This is fixed in 1.0.1 and 2.0.1