Author: knopp
Date: Thu Feb  7 11:55:10 2008
New Revision: 619607

URL: http://svn.apache.org/viewvc?rev=619607&view=rev
Log:
Made rendering of <head> and </head> tags optional

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java?rev=619607&r1=619606&r2=619607&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/html/internal/HtmlHeaderContainer.java
 Thu Feb  7 11:55:10 2008
@@ -168,9 +168,13 @@
 
                        if (output.length() > 0)
                        {
-                               webResponse.write("<head>");
+                               if (renderOpenAndCloseTags())
+                                       webResponse.write("<head>");
+                               
                                webResponse.write(output);
-                               webResponse.write("</head>");
+                               
+                               if (renderOpenAndCloseTags())
+                                       webResponse.write("</head>");
                        }
                }
                finally
@@ -180,6 +184,10 @@
                }
        }
 
+       protected boolean renderOpenAndCloseTags() {
+               return true;
+       }
+       
        /**
         * Ask all child components of the Page if they have something to 
contribute to the &lt;head&gt;
         * section of the HTML output. Every component interested must 
implement IHeaderContributor.


Reply via email to