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; } /**