}
}
public void handleFileUpload(FileUploadEvent fileUploadEvent) throws Exception {
List<UploadedFile> uploadedFiles = applicantModelBean.getUploadedFiles();
UploadedFile uploadedFile = fileUploadEvent.getUploadedFile();
if (uploadedFile != null) {
if (uploadedFile.getStatus() == UploadedFile.Status.FILE_SAVED) {
uploadedFiles.add(uploadedFile);
logger.debug("Received fileName=[{0}] absolutePath=[{1}]", uploadedFile.getName(),
uploadedFile.getAbsolutePath());
}
else {
logger.error("Uploaded file status=[" + uploadedFile.getStatus().toString() + "] " +
uploadedFile.getMessage());
FacesMessageUtil.addGlobalUnexpectedErrorMessage(FacesContext.getCurrentInstance());
}
}
}