You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2009/12/10 08:05:30 UTC

svn commit: r889118 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java

Author: ivaynberg
Date: Thu Dec 10 07:05:29 2009
New Revision: 889118

URL: http://svn.apache.org/viewvc?rev=889118&view=rev
Log:
WICKET-2606 enclosure reports incorrect component id for missing components inside the enclosure
Issue: WICKET-2606

Modified:
    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java?rev=889118&r1=889117&r2=889118&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java Thu Dec 10 07:05:29 2009
@@ -169,7 +169,7 @@
 		ensureAllChildrenPresent(container, markupStream, enclosureOpenTag);
 
 		Component controller = container.get(childId.toString());
-		checkChildComponent(controller);
+		checkChildComponent(controller, childId);
 
 		// set the enclosure visibility
 		setVisible(controller.determineVisibility());
@@ -213,14 +213,14 @@
 		it.rewind();
 	}
 
-	private void checkChildComponent(Component controller)
+	private void checkChildComponent(Component child, CharSequence id)
 	{
-		if (controller == null)
+		if (child == null)
 		{
-			throw new WicketRuntimeException("Could not find child with id: " + childId +
+			throw new WicketRuntimeException("Could not find child with id: " + id +
 				" in the wicket:enclosure");
 		}
-		else if (controller == this)
+		else if (child == this)
 		{
 			throw new WicketRuntimeException(
 				"Programming error: childComponent == enclose component; endless loop");
@@ -259,7 +259,7 @@
 					}.execute();
 
 					child = container.get(tag.getId());
-					checkChildComponent(child);
+					checkChildComponent(child, tag.getId());
 
 					if (buffer.length() > 0)
 					{