2
I am migrating a project to JEE7 from Primefaces 3.5 to 5.0 and I have a problem with Fileupload. Does not load the file into the JSF 2.2 Event Manager.
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? JSF2.2 has changed some configuration or property ?
What comes in the method parameter?
– igventurelli
I put an exit to the console in enent.getFie() ma showed nothing as it is not firing the event.
– user2509556