if(EsimsUtils.compareDates(new Date(), this.formIssuedOn)== -1)
throw new BusinessRuleException("The date of issuing the form cannot be in the future");
}
catch (BusinessRuleException businessRuleException) {
ValidationErrors errors = new ValidationErrors();
errors.add("formIssuedOn", new LocalizableError("/officestaff/applicationforms/futureFormIssuedDate"));
getContext().setValidationErrors(errors);
return getContext().getSourcePageResolution();
}
try{
if(EsimsUtils.compareDates(new Date(), this.formReceivedOn)== -1)
throw new BusinessRuleException("The date of receiving the form cannot be in the future");
}
catch (BusinessRuleException businessRuleException) {
ValidationErrors errors = new ValidationErrors();
errors.add("formReceivedOn", new LocalizableError("/officestaff/applicationforms/futureFormReceivedDate"));
getContext().setValidationErrors(errors);
return getContext().getSourcePageResolution();
}
try{
if(EsimsUtils.compareDates(this.formFilledOn, this.formIssuedOn)== -1)
throw new BusinessRuleException("The date of filling the form cannot be earlier than the issual date");
}
catch (BusinessRuleException businessRuleException) {
ValidationErrors errors = new ValidationErrors();
errors.add("formReceivedOn", new LocalizableError("/officestaff/applicationforms/previousFormFillingDate"));
getContext().setValidationErrors(errors);
return getContext().getSourcePageResolution();
}
try{
if(EsimsUtils.compareDates(this.formIssuedOn, this.formReceivedOn)> 0)
throw new BusinessRuleException("The date of receving the form cannot be earlier than issuance");
}
catch (BusinessRuleException businessRuleException) {
ValidationErrors errors = new ValidationErrors();
errors.add("formReceivedOn", new LocalizableError("/officestaff/applicationforms/earlierFormReceivedDate"));
getContext().setValidationErrors(errors);
return getContext().getSourcePageResolution();
}
String buttonName = "showParentDetailsPage";