You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ad...@apache.org on 2016/06/20 16:26:46 UTC

wicket git commit: WICKET-6187 Enclosures rendered twice in derived component

Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x c1cf15cba -> 084590a07


WICKET-6187 Enclosures rendered twice in derived component

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/084590a0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/084590a0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/084590a0

Branch: refs/heads/wicket-7.x
Commit: 084590a07b80b3cb05d268965cc6b15f75afe95c
Parents: c1cf15c
Author: Andrea Del Bene <ad...@apache.org>
Authored: Mon Jun 20 18:26:07 2016 +0200
Committer: Andrea Del Bene <ad...@apache.org>
Committed: Mon Jun 20 18:26:07 2016 +0200

----------------------------------------------------------------------
 .../wicket/markup/parser/filter/InlineEnclosureHandler.java | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/084590a0/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
index 0014b92..07a53dc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/parser/filter/InlineEnclosureHandler.java
@@ -67,12 +67,6 @@ public final class InlineEnclosureHandler extends AbstractMarkupFilter
 	private Deque<ComponentTag> enclosures;
 
 	/**
-	 * InlineEnclosures are not removed after render as other auto-components,
-	 * thus they have to have a stable id.
-	 */
-	private int counter;
-
-	/**
 	 * Construct.
 	 */
 	public InlineEnclosureHandler()
@@ -115,7 +109,8 @@ public final class InlineEnclosureHandler extends AbstractMarkupFilter
 				{
 					if (Strings.isEmpty(htmlId))
 					{
-						String id = getWicketNamespace() + "_" + INLINE_ENCLOSURE_ID_PREFIX + (counter++);
+						String id = getWicketNamespace() + "_" + INLINE_ENCLOSURE_ID_PREFIX + 
+							getRequestUniqueId();
 						tag.setId(id);
 					}
 					else