private static void decodeSimple(FacesContext context, FileUpload fileUpload, HttpServletRequest request) throws IOException, ServletException {
Part part = request.getPart(fileUpload.getSimpleInputDecodeId(context));
if(part != null) {
fileUpload.setTransient(true);
fileUpload.setSubmittedValue(new NativeUploadedFile(part));
}
else {
fileUpload.setSubmittedValue("");
}
}