You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "mira-silhavy (via GitHub)" <gi...@apache.org> on 2025/05/23 08:07:38 UTC

Re: [PR] WICKET-3899 process the form in postorder and testing for IFormVisitorParticipant tagging interface [wicket]

mira-silhavy commented on code in PR #1031:
URL: https://github.com/apache/wicket/pull/1031#discussion_r2104055098


##########
wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java:
##########
@@ -2059,13 +2018,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.



-- 
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-unsubscribe@wicket.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org