if (context.isPostback() && context.isValidationFailed()) {
UIForm form = getCurrentForm();
if (form != null) {
final StringBuilder clientIdsAsJSON = new StringBuilder();
form.visitTree(VisitContext.createVisitContext(context, null, VISIT_HINTS), new VisitCallback() {
@Override
public VisitResult visit(VisitContext context, UIComponent component) {
if (component instanceof UIInput && !((UIInput) component).isValid()) {
if (clientIdsAsJSON.length() > 0) {