if (component instanceof HtmlFormComponent) { formComponents.add(component); }
    private boolean validateComponent(IViewState viewState, HtmlComponent component, MetaObject metaObject) {        boolean valid = true;                List<HtmlComponent> validators = component.getChildren(new Predicate() {            public boolean evaluate(Object component) {                return component instanceof HtmlValidator;            }                    });                if (validators.isEmpty()) {            List<HtmlComponent> formComponents = component.getChildren(new Predicate() {                public boolean evaluate(Object object) {                    if (! (object instanceof HtmlFormComponent)) {                        return false;                    }                                        HtmlFormComponent formComponent = (HtmlFormComponent) object;                    return formComponent.getTargetSlot() != null;                }                            });                        if (component instanceof HtmlFormComponent) {                formComponents.add(component);            }                        if (! formComponents.isEmpty()) {                HtmlFormComponent formComponent = (HtmlFormComponent) formComponents.get(0);                                HtmlValidator validator = formComponent.getValidator();                                if (validator == null) {                    MetaSlotKey key = formComponent.getTargetSlot();                    MetaSlot slot = getMetaSlot(metaObject, key);                                        formComponent.setValidator(slot);                    validator = formComponent.getValidator();                }                                if (validator != null) {                    validators.add(validator);                }            }        }        for (HtmlComponent validator : validators) {            HtmlValidator htmlValidator = (HtmlValidator) validator;                        htmlValidator.performValidation();            valid = valid && htmlValidator.isValid();                        if (! htmlValidator.isValid()) { // validator message                if (metaObject instanceof MetaSlot) {                    viewState.addMessage(new ViewStateMessage((MetaSlot) metaObject, htmlValidator.getErrorMessage()));                }            }        }                return valid;    }