Repository: wicket Updated Branches: refs/heads/wicket-7.x 961d6cde4 -> f1f34994c
Revert "WICKET-6231 wicket:enclosure and getVariation()." This reverts commit 961d6cde4fe6f434a44385a6dc5f5b187816f169. Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/f1f34994 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f1f34994 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f1f34994 Branch: refs/heads/wicket-7.x Commit: f1f34994c6637f9d49245204350a57a5dae76396 Parents: 961d6cd Author: Andrea Del Bene <[email protected]> Authored: Mon Aug 29 14:49:52 2016 +0200 Committer: Andrea Del Bene <[email protected]> Committed: Mon Aug 29 14:49:52 2016 +0200 ---------------------------------------------------------------------- .../main/java/org/apache/wicket/Component.java | 3 -- .../wicket/markup/MarkupVariationTest.java | 32 ++------------------ 2 files changed, 2 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/f1f34994/wicket-core/src/main/java/org/apache/wicket/Component.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java b/wicket-core/src/main/java/org/apache/wicket/Component.java index a309732..2f6715e 100644 --- a/wicket-core/src/main/java/org/apache/wicket/Component.java +++ b/wicket-core/src/main/java/org/apache/wicket/Component.java @@ -980,9 +980,6 @@ public abstract class Component */ public final void beforeRender() { - //clear any possible markup loaded before rendering phase - setMarkup(null); - if (this instanceof IFeedback) { // this component is a feedback. Feedback must be initialized last, so that http://git-wip-us.apache.org/repos/asf/wicket/blob/f1f34994/wicket-core/src/test/java/org/apache/wicket/markup/MarkupVariationTest.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/MarkupVariationTest.java b/wicket-core/src/test/java/org/apache/wicket/markup/MarkupVariationTest.java index 705e075..65cc4d2 100644 --- a/wicket-core/src/test/java/org/apache/wicket/markup/MarkupVariationTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/markup/MarkupVariationTest.java @@ -25,7 +25,6 @@ import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.util.resource.IResourceStream; import org.apache.wicket.util.resource.StringResourceStream; -import org.apache.wicket.util.tester.FormTester; import org.apache.wicket.util.tester.WicketTestCase; import org.junit.Test; @@ -62,20 +61,6 @@ public class MarkupVariationTest extends WicketTestCase { return (MarkupContainer) tester.getComponentFromLastRenderedPage("p"); } - - /** - * https://issues.apache.org/jira/browse/WICKET-6231 - */ - @Test - public void changeVariationBeforeRendering() throws Exception - { - tester.startPage(new VariationPage()); - FormTester formTester = tester.newFormTester("p:a_form"); - - formTester.submit(); - - tester.assertContainsNot("One"); - } private static class VariationPage extends WebPage implements IMarkupResourceStreamProvider { @@ -110,22 +95,14 @@ public class MarkupVariationTest extends WicketTestCase @Override public void onClick(AjaxRequestTarget target) { - changeVariation(); + variation = "one".equals(variation) ? "two" : "one"; target.add(VariationPanel.this); } }); add(new Label("simpleLabel", "Label")); - add(new Form<Void>("a_form") - { - @Override - protected void onSubmit() - { - super.onSubmit(); - changeVariation(); - } - }); + add(new Form<Void>("a_form")); add(new Label("child", "Inline Enclosure child text")); add(new Label("nestedChild", "Nested Inline Enclosure child text")); @@ -137,10 +114,5 @@ public class MarkupVariationTest extends WicketTestCase { return variation; } - - private void changeVariation() - { - variation = "one".equals(variation) ? "two" : "one"; - } } }
