[
https://issues.apache.org/jira/browse/WICKET-3899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898128#comment-17898128
]
Pedro Santos edited comment on WICKET-3899 at 11/22/24 3:23 PM:
----------------------------------------------------------------
Taking a second look, the best option is to use the
Form#wantSubmitOnParentFormSubmit (introduced in the ticket WICKET-5889) to
test which nested forms will be processed rather than to use the
IFormVisitorParticipant, which is the interface used in FormCompontent tree
traversal inside a form. This way IFormVisitorParticipant will have its current
responsibility only, not being overloaded by a new one already best described
by Form#wantSubmitOnParentFormSubmit.
I may add that in the current version, form validators don't check whether
dependent components are inside a form that is processed or not based on the
new Form#wantSubmitOnParentFormSubmit flag.
was (Author: pedrosans):
Taking a second look, the best option is to use the
Form#wantSubmitOnParentFormSubmit (introduced in the ticket WICKET-5889) to
test which nested forms will be processed than to use the
IFormVisitorParticipant, which is a tagging interface used in the
FormCompontent tree traversal inside a form. This way the
IFormVisitorParticipant will have its current responsibility only, not being
overloaded by a new one already best described by
Form#wantSubmitOnParentFormSubmit.
I may add that in the current version there is a new problem with form
validators: they aren't checking if dependent components are inside a form that
is not processed because of the new Form#wantSubmitOnParentFormSubmit flag.
> IFormVisitorParticipant don't get tested when validation method is visiting
> inner forms
> ---------------------------------------------------------------------------------------
>
> Key: WICKET-3899
> URL: https://issues.apache.org/jira/browse/WICKET-3899
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.17, 1.5-RC5.1
> Reporter: Pedro Santos
> Assignee: Pedro Santos
> Priority: Major
> Attachments: WICKET-3899-fix-test.patch, WICKET-3899.patch
>
>
> The inconsistencies is at Form#validate method. It invokes
> validateNestedForms and validateComponents, but only the second one uses a
> visitor filter testing for IFormVisitorParticipant#processChildren value.
> More about: http://markmail.org/message/q2qfuyg3gcrurxxp
--
This message was sent by Atlassian Jira
(v8.20.10#820010)