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 2009/02/11 21:21:34 UTC

svn commit: r743482 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java

Author: bommel
Date: Wed Feb 11 20:21:34 2009
New Revision: 743482

URL: http://svn.apache.org/viewvc?rev=743482&view=rev
Log:
(TOBAGO-728) More detail warning description if a column contains more than one child

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=743482&r1=743481&r2=743482&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Wed Feb 11 20:21:34 2009
@@ -396,12 +396,18 @@
           writer.writeClassAttribute("tobago-sheet-column-selector");
           writer.endElement(HtmlConstants.IMG);
         } else {
-          for (UIComponent grandkid : data.getRenderedChildrenOf(column)) {
+          List<UIComponent> childs = data.getRenderedChildrenOf(column);
+          for (UIComponent grandkid : childs) {
             // set height to 0 to prevent use of layoutheight from parent
             grandkid.getAttributes().put(Attributes.LAYOUT_HEIGHT, HEIGHT_0);
             RenderUtil.prepareRendererAll(facesContext, grandkid);
             RenderUtil.encode(facesContext, grandkid);
           }
+          if (childs.size() > 1) {
+            if (LOG.isInfoEnabled()) {
+              LOG.info("Column should not contain more than one child. Please surround the components with a tc:panel.");
+            }
+          }
         }
 
         writer.endElement(HtmlConstants.DIV);