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 2007/05/02 06:32:16 UTC

svn commit: r534301 - /incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java

Author: ivaynberg
Date: Tue May  1 21:32:10 2007
New Revision: 534301

URL: http://svn.apache.org/viewvc?view=rev&rev=534301
Log:
improved fragment markup resolution. sometimes the wrong markup stream would be used when the markup provider is specified. the fragment should always first try the markup provider's associated markupstream.

Modified:
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java?view=diff&rev=534301&r1=534300&r2=534301
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java Tue May  1 21:32:10 2007
@@ -208,14 +208,24 @@
 	 */
 	protected MarkupStream chooseMarkupStream(final MarkupStream markupStream)
 	{
+		MarkupStream stream = null;
+
 		if (this.markupProvider == null)
 		{
-			return markupStream;
+			stream = markupStream;
 		}
+		else
+		{
 
-		// The following statement assumes that the markup provider is a
-		// parent along the line up to the Page
-		return this.markupProvider.getMarkupStream();
+			stream = this.markupProvider.getAssociatedMarkupStream(false);
+			if (stream == null)
+			{
+				// The following statement assumes that the markup provider is a
+				// parent along the line up to the Page
+				stream = markupProvider.getMarkupStream();
+			}
+		}
+		return stream;
 	}
 
 	/**