Author: jdonnerstag Date: Sun Jun 5 12:19:27 2011 New Revision: 1132378 URL: http://svn.apache.org/viewvc?rev=1132378&view=rev Log: removed MarkupContainer.getAssociatedMarkupStream which was replaced with getAssociatedMarkup already some time ago Issue: WICKET-3741
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/form/formComponentPanel/MyFormComponentPanel.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/MergedMarkupTest.java wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionMyLabel.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java?rev=1132378&r1=1132377&r2=1132378&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java Sun Jun 5 12:19:27 2011 @@ -410,11 +410,11 @@ public abstract class MarkupContainer ex * * @return A stream of MarkupElement elements. Null if not found. */ - public IMarkupFragment getAssociatedMarkup() + public Markup getAssociatedMarkup() { try { - IMarkupFragment markup = MarkupFactory.get().getMarkup(this, false); + Markup markup = MarkupFactory.get().getMarkup(this, false); // If we found markup for this container if ((markup != null) && (markup != Markup.NO_MARKUP)) @@ -1800,7 +1800,7 @@ public abstract class MarkupContainer ex */ public boolean hasAssociatedMarkup() { - return MarkupFactory.get().hasAssociatedMarkup(this); + return getAssociatedMarkup() != null; } /** Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/form/formComponentPanel/MyFormComponentPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/form/formComponentPanel/MyFormComponentPanel.java?rev=1132378&r1=1132377&r2=1132378&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/form/formComponentPanel/MyFormComponentPanel.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/form/formComponentPanel/MyFormComponentPanel.java Sun Jun 5 12:19:27 2011 @@ -16,7 +16,6 @@ */ package org.apache.wicket.markup.html.form.formComponentPanel; -import org.apache.wicket.markup.IMarkupFragment; import org.apache.wicket.markup.Markup; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.form.FormComponentPanel; @@ -39,7 +38,7 @@ public class MyFormComponentPanel extend } @Override - public IMarkupFragment getAssociatedMarkup() + public Markup getAssociatedMarkup() { return Markup.of("<wicket:panel>test</wicket:panel>"); } Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/MergedMarkupTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/MergedMarkupTest.java?rev=1132378&r1=1132377&r2=1132378&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/MergedMarkupTest.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/MergedMarkupTest.java Sun Jun 5 12:19:27 2011 @@ -19,7 +19,9 @@ package org.apache.wicket.markup.parser; import junit.framework.TestCase; import org.apache.wicket.Page; +import org.apache.wicket.markup.Markup; import org.apache.wicket.markup.MarkupParser; +import org.apache.wicket.markup.MarkupResourceStream; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.util.tester.WicketTester; @@ -36,10 +38,11 @@ public class MergedMarkupTest extends Te WicketTester tester = new WicketTester(); Page page = new SubPageWithoutMarkup(); - MarkupStream markup = page.getAssociatedMarkupStream(true); - assertEquals("<?xml version=\"1.0\" encoding=\"utf-8\"?>", markup.getXmlDeclaration()); - assertEquals("utf-8", markup.getEncoding()); - assertEquals(MarkupParser.WICKET, markup.getWicketNamespace()); + Markup markup = page.getAssociatedMarkup(); + MarkupResourceStream stream = markup.getMarkupResourceStream(); + assertEquals("<?xml version=\"1.0\" encoding=\"utf-8\"?>", stream.getXmlDeclaration()); + assertEquals("utf-8", stream.getEncoding()); + assertEquals(MarkupParser.WICKET, stream.getWicketNamespace()); } /** Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionMyLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionMyLabel.java?rev=1132378&r1=1132377&r2=1132378&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionMyLabel.java (original) +++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionMyLabel.java Sun Jun 5 12:19:27 2011 @@ -64,7 +64,7 @@ public class HeaderSectionMyLabel extend @Override public IMarkupFragment getMarkup(final MarkupContainer parent, final Component child) { - MarkupStream markup = parent.getAssociatedMarkupStream(true); + MarkupStream markup = new MarkupStream(parent.getAssociatedMarkup()); markup.skipRawMarkup(); return markup.getMarkupFragment(); }