posted 13 years ago
Does anybody use p:fileUpload no problem?
I have problem when i click upload button. It doent go into the managedBean action.
here is my code.
xhtml:<h:form id="mainform" prependId="false" enctype="multipart/form-data">
<p:fileUpload id="test"
fileUploadListener="#{commonBean.handleFileUpload}"
allowTypes="*.jpg;*.png;*.gif;" description="Images" />
</h:form>
managedBean:
public void handleFileUpload(FileUploadEvent event) {
System.out.println(event.getFile().getFileName());
}