Author: jdonnerstag
Date: Wed Apr  2 02:19:53 2008
New Revision: 643809

URL: http://svn.apache.org/viewvc?rev=643809&view=rev
Log:
one more fix for wicket-1458: open-close => open-body-close

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
    
wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_16.html

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=643809&r1=643808&r2=643809&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/MarkupContainer.java
 Wed Apr  2 02:19:53 2008
@@ -383,7 +383,7 @@
         */
        public String getMarkupType()
        {
-           return getPage().getMarkupType();
+               return getPage().getMarkupType();
        }
 
        /**
@@ -1446,6 +1446,18 @@
        protected final void renderComponentTagBody(final MarkupStream 
markupStream,
                final ComponentTag openTag)
        {
+               if ((markupStream != null) && (markupStream.getCurrentIndex() > 
0))
+               {
+                       // If the original tag has been changed from open-close 
to open-body-close,
+                       // than historically renderComponentTagBody gets 
called, but actually
+                       // it shouldn't do anything since there is no body for 
that tag.
+                       ComponentTag origOpenTag = 
(ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1);
+                       if (origOpenTag.isOpenClose())
+                       {
+                               return;
+                       }
+               }
+
                // If the open tag requires a close tag
                boolean render = openTag.requiresCloseTag();
                if (render == false)

Modified: 
wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_16.html
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_16.html?rev=643809&r1=643808&r2=643809&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_16.html
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_16.html
 Wed Apr  2 02:19:53 2008
@@ -4,6 +4,6 @@
   <anytag wicket:id="test2"/>
   <!-- note that span tag are allows changed to open-body-close. See 
OpenCloseTagExpander -->
   <span wicket:id="test3"/>
-  <span wicket:id="test4"/>
+  <anytag wicket:id="test4"/>
 </body>
 </html>


Reply via email to