if (!this.part.isRejected()) {
return true;
}
// Set a validation error indicating the sizes in kbytes (rounded)
RejectedPart rjp = (RejectedPart)this.part;
int size = (rjp.getContentLength() + 512) / 1024;
int maxSize = (rjp.getMaxContentLength() + 512) / 1024;
String[] i18nParams = new String[] { String.valueOf(size), String.valueOf(maxSize) };
I18nMessage i18nMessage = new I18nMessage("upload.rejected", i18nParams, FormsConstants.I18N_CATALOGUE);
setValidationError(new ValidationError(i18nMessage));
return false;
}