You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2021/09/13 07:25:19 UTC
[wicket] branch master updated: WICKET-6919 Improve
EnclosureContainer's javadoc to explain that it should not be used with
This is an automated email from the ASF dual-hosted git repository.
mgrigorov 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 ecafdee WICKET-6919 Improve EnclosureContainer's javadoc to explain that it should not be used with <wicket:enclosure>
ecafdee is described below
commit ecafdee1d62875d9287bd61e31884ffbfe98f766
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Sep 13 10:23:48 2021 +0300
WICKET-6919 Improve EnclosureContainer's javadoc to explain that it should not be used with <wicket:enclosure>
(cherry picked from commit 87f12fcadc2ee6e1f079cd5fc68d280b385cc5ec)
---
.../apache/wicket/markup/html/basic/EnclosureContainer.java | 12 +++++++++---
.../markup/html/panel/DefaultMarkupSourcingStrategy.java | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnclosureContainer.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnclosureContainer.java
index 48c9391..32b7fb4 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnclosureContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/basic/EnclosureContainer.java
@@ -25,8 +25,8 @@ import org.apache.wicket.util.lang.Args;
* <code><wicket:enclosure></code> is nice and prevents that users have to add boilerplate to
* their application. But it is not without problems. The child components are children in the
* markup, but the auto-component generated for the enclosure tag will not magically re-parent the
- * child components. Thus the markup hierarchy and the component hierarchy will be out of sync. The
- * automatically created enclosure container will be created along side its "children" with both
+ * child components. Thus, the markup hierarchy and the component hierarchy will be out of sync. The
+ * automatically created enclosure container will be created alongside its "children" with both
* attached to the very same parent container. That leads to a tricky situation since e.g.
* <code>onBeforeRender()</code> will be called for enclosure children even if the enclosure is made
* invisible by it controlling child.
@@ -41,6 +41,12 @@ import org.apache.wicket.util.lang.Args;
* which basically does the same. But instead of adding the children to the Page, Panel whatever,
* you must add the children to this container in order to keep the component hierarchy in sync.
* </p>
+ *
+ * <p>
+ * <strong>Note</strong>: Make sure the markup element associated with this {@link EnclosureContainer}
+ * is anything but <em><wicket:enclosure></em>, e.g. a <div>, a <span> or even a
+ * <wicket:container>
+ * </p>
*
* @author Juergen Donnerstag
* @since 1.5
@@ -72,7 +78,7 @@ public class EnclosureContainer extends WebMarkupContainer
}
/**
- * Overriden to set the visibility depending on childs {@link #determineVisibility()}.
+ * Overridden to set the visibility depending on children {@link #determineVisibility()}.
*/
@Override
protected void onConfigure()
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DefaultMarkupSourcingStrategy.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DefaultMarkupSourcingStrategy.java
index 7506d23..08c975d 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DefaultMarkupSourcingStrategy.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/panel/DefaultMarkupSourcingStrategy.java
@@ -76,7 +76,7 @@ public final class DefaultMarkupSourcingStrategy extends AbstractMarkupSourcingS
@Override
public IMarkupFragment getMarkup(final MarkupContainer container, final Component child)
{
- // If the sourcing strategy did not provide one, than ask the component.
+ // If the sourcing strategy did not provide one, then ask the component.
// Get the markup for the container
IMarkupFragment containerMarkup = container.getMarkup();
if (containerMarkup == null)