myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r544443 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
Date Tue, 05 Jun 2007 10:44:32 GMT
Author: weber
Date: Tue Jun  5 03:44:29 2007
New Revision: 544443

URL: http://svn.apache.org/viewvc?view=rev&rev=544443
Log:
undo 'minor cleanup' revert to rev 541081
  null is NOT instance of String

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

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?view=diff&rev=544443&r1=544442&r2=544443
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
(original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
Tue Jun  5 03:44:29 2007
@@ -203,7 +203,7 @@
 
   private boolean columnIsRendered(List<UIGridLayout.Row> rows, int column) {
     for (UIGridLayout.Row row : rows) {
-      Object object = row.getElements().get(column); 
+      Object object = row.getElements().get(column);
       if (object instanceof UIComponent) {
         if (object instanceof UICell) {
           UICell cell = (UICell) object;
@@ -450,14 +450,16 @@
 
   private int getCellSpacing(FacesContext facesContext, UIComponent component) {
     String cellspacing = (String) component.getAttributes().get(ATTR_CELLSPACING);
-    try {
-      return Integer.parseInt(cellspacing);
-    } catch (NumberFormatException e) {
-      if (LOG.isWarnEnabled()) {
-        LOG.warn("Illegal value for cellspacing : " + cellspacing
-            + " using default");
+    if (cellspacing instanceof String) {
+      try {
+        return Integer.parseInt(cellspacing);
+      } catch (NumberFormatException e) {
+        if (LOG.isWarnEnabled()) {
+          LOG.warn("Illegal value for cellspacing : " + cellspacing
+              + " using default");
+        }
+        // ignore and return defaut value
       }
-      // ignore and return defaut value
     }
     return getConfiguredValue(facesContext,  component, "cellSpacing");
   }



Mime
View raw message