You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/03/13 14:57:28 UTC

svn commit: r385556 - in /incubator/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/

Author: weber
Date: Mon Mar 13 05:57:28 2006
New Revision: 385556

URL: http://svn.apache.org/viewcvs?rev=385556&view=rev
Log:
fix layout recalculation in sheet columns

Modified:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
    incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIData.java?rev=385556&r1=385555&r2=385556&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIData.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIData.java Mon Mar 13 05:57:28 2006
@@ -19,6 +19,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_COLUMNS;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SELECTED_LIST_STRING;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_HEADER;
@@ -265,7 +266,8 @@
                 .getConfiguredValue(facesContext, this, "cellPaddingWidth");
             child.getAttributes().put(
                 ATTR_LAYOUT_WIDTH, width - cellPaddingWidth);
-          } else {
+            child.getAttributes().remove(ATTR_INNER_WIDTH);
+           } else {
             LOG.warn("More or less than 1 child in column! "
                 + "Can't set width for column " + i + " to " + width);
           }

Modified: incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?rev=385556&r1=385555&r2=385556&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Mon Mar 13 05:57:28 2006
@@ -56,7 +56,7 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import java.awt.*;
+import java.awt.Dimension;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -399,7 +399,7 @@
     boolean needVerticalScroolbar = false;
     Integer innerHeight =
           (Integer) attributes.get(ATTR_INNER_HEIGHT);
-    if (innerHeight != null && innerHeight.intValue() != -1) {
+    if (innerHeight != null && innerHeight.intValue() > 0) {
       int value = innerHeight.intValue();
       int minimum = calculateLayoutHeight(facesContext, layout.getParent(), true);
       if (minimum > value) {