You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2007/05/13 17:19:46 UTC
svn commit: r537596 - in /incubator/wicket/trunk/jdk-1.4/wicket/src:
main/java/org/apache/wicket/markup/html/border/
test/java/org/apache/wicket/markup/html/border/
Author: jdonnerstag
Date: Sun May 13 08:19:45 2007
New Revision: 537596
URL: http://svn.apache.org/viewvc?view=rev&rev=537596
Log:
wicket-560: <wicket:body>[body]</wicket> works strange
fixed and junit test added
Added:
incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java (with props)
incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html (with props)
Modified:
incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java
incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTest.java
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java?view=diff&rev=537596&r1=537595&r2=537596
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/border/Border.java Sun May 13 08:19:45 2007
@@ -93,7 +93,6 @@
static final String BODY = "body";
static final String BORDER = "border";
-
static
{
// register "wicket:body" and "wicket:border"
@@ -310,6 +309,11 @@
markupStream.next();
bodyTag.setType(XmlTag.CLOSE);
renderComponentTag(bodyTag);
+ }
+ else
+ {
+ this.renderComponentTag(borderMarkup.getTag());
+ markupStream.next();
}
// There shall exactly only one body tag per border
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTest.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTest.java?view=diff&rev=537596&r1=537595&r2=537596
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTest.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTest.java Sun May 13 08:19:45 2007
@@ -16,11 +16,13 @@
*/
package org.apache.wicket.markup.html.border;
+import org.apache.wicket.Application;
import org.apache.wicket.WicketTestCase;
import org.apache.wicket.markup.MarkupException;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.protocol.http.MockHttpServletRequest;
+import org.apache.wicket.settings.IMarkupSettings;
/**
@@ -143,5 +145,21 @@
public void test6() throws Exception
{
executeTest(BoxBorderTestPage_6.class, "BoxBorderTestPage_ExpectedResult_6.html");
+ }
+
+ /**
+ * Test a simply page containing the debug component
+ *
+ * @throws Exception
+ */
+ public void test7() throws Exception
+ {
+ final IMarkupSettings markupSettings = Application.get().getMarkupSettings();
+ markupSettings.setCompressWhitespace(true);
+ markupSettings.setStripComments(true);
+ markupSettings.setStripWicketTags(true);
+ markupSettings.setStripXmlDeclarationFromOutput(true);
+
+ executeTest(BoxBorderTestPage_1.class, "BoxBorderTestPage_ExpectedResult_7.html");
}
}
Added: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java?view=auto&rev=537596
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java (added)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java Sun May 13 08:19:45 2007
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.markup.html.border;
+
+import org.apache.wicket.markup.html.WebPage;
+
+
+/**
+ * Mock page for testing.
+ *
+ * @author Chris Turner
+ */
+public class BoxBorderTestPage_7 extends WebPage
+{
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct.
+ *
+ *
+ */
+ public BoxBorderTestPage_7()
+ {
+ add(new BorderComponent1("border1"));
+ add(new BorderComponent2("border2"));
+ }
+}
Propchange: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_7.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html?view=auto&rev=537596
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html (added)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html Sun May 13 08:19:45 2007
@@ -0,0 +1,22 @@
+<!--
+====================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<body>
+<span>
+davor middle-1 danach
+</span>
+<span>
+davor middle-2 danach
+</span>
+</body>
+</html>
Propchange: incubator/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_7.html
------------------------------------------------------------------------------
svn:eol-style = native