myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r743482 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
Date Wed, 11 Feb 2009 20:21:34 GMT
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);



Mime
View raw message