@Override
public int doStartTag() throws JspException {
try {
final Writer out = pageContext.getOut();
final ValidationResult validationResult = validateObject(validatable);
if (var != null) {
pageContext.setAttribute(var, validationResult, PageContext.PAGE_SCOPE);
}
if (validationResult != null) {
if (validationResult.getValidationState().isBlank()) {
return displayBlanks();
} else if (!validationResult.getValidationState().isValid()) {
return displayErrors(out, validationResult);
}
}
return EVAL_BODY_INCLUDE;