You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/03/07 11:08:07 UTC

svn commit: r1575215 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java

Author: lofwyr
Date: Fri Mar  7 10:08:07 2014
New Revision: 1575215

URL: http://svn.apache.org/r1575215
Log:
TOBAGO-1372: tc:sheet with rowSpan in "auto" row gets 0 height

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java?rev=1575215&r1=1575214&r2=1575215&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIGridLayout.java Fri Mar  7 10:08:07 2014
@@ -172,7 +172,6 @@ public abstract class AbstractUIGridLayo
             } else {
               if (LOG.isDebugEnabled()) {
                 LOG.debug("Components with span > 1 will be ignored in 'auto' layout rows/columns.");
-                // todo: give this information to the developer
               }
             }
           }
@@ -184,7 +183,15 @@ public abstract class AbstractUIGridLayo
         heads[i].setIntervalList(intervalList);
       }
       if (token instanceof AutoLayoutToken) {
-        heads[i].setCurrent(intervalList.getCurrent());
+        if (intervalList.size() > 0) {
+          heads[i].setCurrent(intervalList.getCurrent());
+        } else {
+          heads[i].setCurrent(Measure.valueOf(100));
+          LOG.warn("Found an 'auto' token in {} definition, but there is no component inside with span = 1! " +
+              "So the value for 'auto' can't be evaluated (clientId={}). Using 100px.",
+              orientation == Orientation.HORIZONTAL ? "columns" : "rows",
+              getClientId(getFacesContext()));
+        }
       }
       i++;
     }