mira-silhavy commented on code in PR #1033:
URL: https://github.com/apache/wicket/pull/1033#discussion_r2104060257
##########
wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java:
##########
@@ -2059,13 +2020,13 @@ protected final void validateFormValidator(final
IFormValidator validator)
}
// check if the dependent component is visible
and is attached to
// the page
- else if
(!isFormComponentVisibleInPage(dependent))
+ else if (!dependent.isVisibleInHierarchy() ||
!dependent.isEnabledInHierarchy() || !dependent.isFormParticipant())
Review Comment:
Hi @pedrosans, addition of `!dependent.isEnabledInHierarchy()` makes our
migration to Wicket 10 problematic. We have many `FormValidator`s with multiple
fields and some are conditionally enabled/disabled, but their values still
participate in validation logic.
Following this new logic we'd have to modify `getDependentFormComponents`
and check for each field being enabled/disabled.
I don't see any particular benefit by adding `isEnabledInHierarchy`
condition.
What was the reason behind this change? Because we'd like this to work
without updateing every validator and making sure it follows this
`isEnabledInHierarchy` logic.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]