mira-silhavy commented on code in PR #1186: URL: https://github.com/apache/wicket/pull/1186#discussion_r2146915890
########## wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java: ########## @@ -1986,7 +1986,7 @@ protected final void validateFormValidator(final IFormValidator validator) } // check if the dependent component is visible and is attached to // the page - else if (!dependent.isVisibleInHierarchy() || !dependent.isEnabledInHierarchy() || !dependent.isFormParticipant()) Review Comment: I looked into the whole code and it already does what you asked. The whole method looks like this ``` protected final void validateFormValidator(final IFormValidator validator) { Args.notNull(validator, "validator"); final FormComponent<?>[] dependents = validator.getDependentFormComponents(); boolean validate = false; if (dependents != null) { for (final FormComponent<?> dependent : dependents) { if (dependent.isEnabledInHierarchy()) { validate = true; // check if the dependent component is valid if (!dependent.isValid()) { validate = false; break; } // check if the dependent component is visible and is attached to // the page else if (!dependent.isVisibleInHierarchy() || !dependent.isFormParticipant()) { if (log.isWarnEnabled()) { log.warn("IFormValidator in form `" + getPageRelativePath() + "` depends on a component that has been removed from the page or is no longer visible. " + "Offending component id `" + dependent.getId() + "`."); } validate = false; break; } } } } if (validate) { validator.validate(this); } } -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@wicket.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org