myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r743483 - in /myfaces/tobago/branches/tobago-1.0.x: sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
Date Wed, 11 Feb 2009 20:22:56 GMT
Author: bommel
Date: Wed Feb 11 20:22:54 2009
New Revision: 743483

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

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

Modified: myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SimpleSheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SimpleSheetRenderer.java?rev=743483&r1=743482&r2=743483&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SimpleSheetRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SimpleSheetRenderer.java
Wed Feb 11 20:22:54 2009
@@ -241,7 +241,6 @@
       int currentLeft = 0;
       for (UIColumn column : renderedColumnList) {
         columnIndex++;
-        List<UIComponent> childs = data.getRenderedChildrenOf(column);
         writer.startElement(HtmlConstants.DIV, null);
         writer.writeClassAttribute("tobago-simpleSheet-cell");
         // todo cell markup
@@ -263,11 +262,17 @@
           writer.writeClassAttribute("tobago-sheet-column-selector");
           writer.endElement(HtmlConstants.IMG);
         } else {
+          List<UIComponent> childs = data.getRenderedChildrenOf(column);
           for (UIComponent grandkid : childs) {
             // set height to 0 to prevent use of layoutheight from parent
             grandkid.getAttributes().put(TobagoConstants.ATTR_LAYOUT_HEIGHT, 0);
             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);
         currentLeft += columnWidths.get(columnIndex);

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.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/SheetRenderer.java?rev=743483&r1=743482&r2=743483&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
Wed Feb 11 20:22:54 2009
@@ -420,11 +420,17 @@
           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(ATTR_LAYOUT_HEIGHT, HEIGHT_0);
             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