You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jr...@apache.org on 2010/10/22 17:29:38 UTC

svn commit: r1026375 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java

Author: jrthomerson
Date: Fri Oct 22 15:29:37 2010
New Revision: 1026375

URL: http://svn.apache.org/viewvc?rev=1026375&view=rev
Log:
force open tag on FormComponentLabel like we do in a regular label

Modified:
    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java?rev=1026375&r1=1026374&r2=1026375&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponentLabel.java Fri Oct 22 15:29:37 2010
@@ -18,6 +18,7 @@ package org.apache.wicket.markup.html.fo
 
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.parser.XmlTag;
 
 /**
  * A component that represents html <label> tag. This component will automatically make the
@@ -60,6 +61,8 @@ public class FormComponentLabel extends 
 		super.onComponentTag(tag);
 		checkComponentTag(tag, "label");
 		tag.put("for", component.getMarkupId());
+		// always transform the tag to <span></span> so even labels defined as <span/> render
+		tag.setType(XmlTag.OPEN);
 	}
 
 	/**