GeeCON Prague 2014*
The moose likes JSF and the fly likes primefaces fileupload doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "primefaces fileupload doesn Watch "primefaces fileupload doesn New topic
Author

primefaces fileupload doesn't work

yun hu
Greenhorn

Joined: Feb 18, 2010
Posts: 13

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());
}
 
GeeCON Prague 2014
 
subject: primefaces fileupload doesn't work