myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r986985 - /myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
Date Thu, 19 Aug 2010 00:04:56 GMT
Author: lu4242
Date: Thu Aug 19 00:04:56 2010
New Revision: 986985

URL: http://svn.apache.org/viewvc?rev=986985&view=rev
Log:
TOMAHAWK-1482 HtmlTableRendererBase produces invalid html if row is not available

Modified:
    myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java

Modified: myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java?rev=986985&r1=986984&r2=986985&view=diff
==============================================================================
--- myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
(original)
+++ myfaces/shared/trunk_2.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
Thu Aug 19 00:04:56 2010
@@ -257,7 +257,7 @@ public class HtmlTableRendererBase exten
         // walk through the newspaper rows
         for(int nr = 0; nr < newspaperRows; nr++)
         {
-
+            boolean rowStartRendered = false;
             // walk through the newspaper columns
             for(int nc = 0; nc < newspaperColumns; nc++) {
 
@@ -284,6 +284,7 @@ public class HtmlTableRendererBase exten
 
                     HtmlRendererUtils.writePrettyLineSeparator(facesContext);
                     renderRowStart(facesContext, writer, uiData, styles, nr);
+                    rowStartRendered = true;
                 }
 
                 List children = getChildren(component);
@@ -310,9 +311,11 @@ public class HtmlTableRendererBase exten
                     if(nc < newspaperColumns - 1) renderSpacerCell(facesContext, writer,
uiData);
                 }
             }
-            renderRowEnd(facesContext, writer, uiData);
-
-            afterRow(facesContext, uiData);
+            if (rowStartRendered)
+            {
+                renderRowEnd(facesContext, writer, uiData);
+                afterRow(facesContext, uiData);
+            }
         }
     }
 



Mime
View raw message