This is an automated email from the ASF dual-hosted git repository.
adelbene pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new 0baeef5d75 WICKET-7167 Submited Form with wantSubmitOnParentFormSubmit
false does not cascade process. (#1283)
0baeef5d75 is described below
commit 0baeef5d75fe07e3001c08c0ea14e98d1a720ffa
Author: Florian Lacreuse <[email protected]>
AuthorDate: Thu Oct 23 23:17:04 2025 +0200
WICKET-7167 Submited Form with wantSubmitOnParentFormSubmit false does not
cascade process. (#1283)
---
.../org/apache/wicket/markup/html/form/NestedFormSubmitTest.java | 7 +++++++
.../src/main/java/org/apache/wicket/markup/html/form/Form.java | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/wicket-core-tests/src/test/java/org/apache/wicket/markup/html/form/NestedFormSubmitTest.java
b/wicket-core-tests/src/test/java/org/apache/wicket/markup/html/form/NestedFormSubmitTest.java
index 350d843896..dd3bdc322e 100644
---
a/wicket-core-tests/src/test/java/org/apache/wicket/markup/html/form/NestedFormSubmitTest.java
+++
b/wicket-core-tests/src/test/java/org/apache/wicket/markup/html/form/NestedFormSubmitTest.java
@@ -198,6 +198,13 @@ class NestedFormSubmitTest extends WicketTestCase
assertFormSubmitOuter(true, false, false);
}
+ @Test
+ void testWithMiddleExclusionAndMiddleIsSubmitted() throws Exception
+ {
+ startPage(false, false, false);
+ assertFormSubmitMiddle(false, true, true);
+ }
+
private void startPage(boolean outerWantsInclusion, boolean
middleWantsInclusion,
boolean middleWantsExclusion)
{
diff --git
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index cf1ef5e1d4..2b959018bc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -1206,7 +1206,7 @@ public class Form<T> extends WebMarkupContainer
{
if (object instanceof Form form)
{
- return
form.wantSubmitOnParentFormSubmit();
+ return form == formToProcess ||
form.wantSubmitOnParentFormSubmit();
}
return true;
}