myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r886012 - /myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
Date Tue, 01 Dec 2009 23:52:52 GMT
Author: lu4242
Date: Tue Dec  1 23:52:51 2009
New Revision: 886012

URL: http://svn.apache.org/viewvc?rev=886012&view=rev
Log:
MYFACES-2423 h:dataTable renderer does not support colgroups facet (thanks to Jakob Korherr
for provide this patch)

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

Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java?rev=886012&r1=886011&r2=886012&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
(original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
Tue Dec  1 23:52:51 2009
@@ -175,7 +175,29 @@
             throws IOException
     {
         HtmlRendererUtils.renderTableCaption(facesContext, writer, component);
-    }    
+    }  
+    
+    /**
+     * Renders the colgroups facet.
+     * @param facesContext the <code>FacesContext</code>.
+     * @param writer the <code>ResponseWriter</code>.
+     * @param component the parent <code>UIComponent</code> containing the facets.
+     * @throws IOException if an exception occurs.
+     * @since 2.0
+     */
+    protected void renderColgroupsFacet(FacesContext facesContext, ResponseWriter writer,
UIComponent component)
+            throws IOException
+    {
+        UIComponent colgroupsFacet = component.getFacet("colgroups");
+        if (colgroupsFacet == null)
+        {
+            // no facet to be rendered
+            return;
+        }
+        // render the facet
+        HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+        RendererUtils.renderChild(facesContext, colgroupsFacet);
+    } 
     
     /**
      * Gets styles for the specified component.
@@ -529,6 +551,7 @@
         ResponseWriter writer = facesContext.getResponseWriter();
 
         renderCaptionFacet(facesContext, writer, uiData);
+        renderColgroupsFacet(facesContext, writer, uiData);
         renderFacet(facesContext, writer, uiData, true);
         renderFacet(facesContext, writer, uiData, false);
     }



Mime
View raw message