You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2010/09/28 12:17:20 UTC

svn commit: r1002099 - /myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java

Author: bommel
Date: Tue Sep 28 10:17:20 2010
New Revision: 1002099

URL: http://svn.apache.org/viewvc?rev=1002099&view=rev
Log:
(TOBAGO-920) The layout of the TabGroup is broken if one Tab is rendered=false

Modified:
    myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?rev=1002099&r1=1002098&r2=1002099&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Tue Sep 28 10:17:20 2010
@@ -309,9 +309,12 @@ public class TabGroupRenderer extends La
 
     writer.startElement(HtmlConstants.COLGROUP, null);
     for (Integer colWidth : tabList.getWidthList()) {
-      writer.startElement(HtmlConstants.COL, null);
-      writer.writeAttribute(HtmlAttributes.WIDTH, colWidth);
-      writer.endElement(HtmlConstants.COL);
+      // skip col with width zero
+      if (colWidth > 0) {
+        writer.startElement(HtmlConstants.COL, null);
+        writer.writeAttribute(HtmlAttributes.WIDTH, colWidth);
+        writer.endElement(HtmlConstants.COL);
+      }
     }
     writer.endElement(HtmlConstants.COLGROUP);