myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject svn commit: r491565 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java
Date Mon, 01 Jan 2007 12:54:01 GMT
Author: paulsp
Date: Mon Jan  1 04:54:00 2007
New Revision: 491565

URL: http://svn.apache.org/viewvc?view=rev&rev=491565
Log:
Fixed NPE when rendering table body and  bodyStyle or bodyStyleClass is null

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java?view=diff&rev=491565&r1=491564&r2=491565
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlTableRenderer.java
Mon Jan  1 04:54:00 2007
@@ -947,8 +947,15 @@
         }
 
         ResponseWriter writer = facesContext.getResponseWriter();
-        writer.writeAttribute(HTML.CLASS_ATTR, bodyStyleClass, BODY_STYLE_CLASS);
-        writer.writeAttribute(HTML.STYLE_ATTR, bodyStyle, BODY_STYLE);
+        if (bodyStyleClass != null)
+        {
+            writer.writeAttribute(HTML.CLASS_ATTR, bodyStyleClass,
+                    BODY_STYLE_CLASS);
+        }
+        if (bodyStyle != null)
+        {
+            writer.writeAttribute(HTML.STYLE_ATTR, bodyStyle, BODY_STYLE);
+        }
     }
 
 



Mime
View raw message