I am migrating a project to JEE7 from PrimeFaces 3.5 to 5.0 and I have a problem with FileUpload. It does not load the file in the JSF 2.2 event listener.
Follow the xhtml code:
<p:fileUpload id="import" value="#{fileBean.file}" mode="single"
label="#{msg.procurar}"
auto="true" fileUploadListener="#{fileBean.handleFileUpload}"
invalidFileMessage="#{msg.somente_excel}"
allowTypes="/(\.|\/)(xls|xlsx)$/" />
Follow the bean:
public void handleFileUpload(FileUploadEvent event) throws IOException {
this.uploadedFile = event.getFile();
}
Does anyone have any idea why the event is not being triggered? Has JSF2.2 changed any configuration or ownership?