0 Replies Latest reply on Oct 4, 2011 2:24 PM by gregcharles

    RF 4.0.0 rich:extendedDataTable width percentage

    gregcharles

      I'm porting an app from RichFaces 3.3.1 to 4.0. In several places, it has extended data tables that set the column widths by percentage. These percentages seem to be ignored by RichFaces 4.0. The app has to look reasonably good on browsers at different resolutions and cannot have horizontal scrolling, so I'm pretty stuck at the moment.

       

      Here's a small example thad demonstrates the problem:

       

      {code:xml}

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core">

       

       

      <h:head><title>Test Page</title></h:head>

      <h:body>

          <rich:extendedDataTable>

              <f:facet name="header">Test Extended Data Table</f:facet>

              <rich:column width="10%">

                  <f:facet name="header">C1</f:facet>

              </rich:column>

              <rich:column width="10%">

                  <f:facet name="header">C2</f:facet>

              </rich:column>

              <rich:column width="50%">

                  <f:facet name="header">Column Three</f:facet>

              </rich:column>

              <rich:column width="30%">

                  <f:facet name="header">Col 4</f:facet>

              </rich:column>

          </rich:extendedDataTable>

      </h:body>

      </html>

      {code}

       

      The same code (less the h:head and h:body tags) works fine on 3.3.1, but on 4.0 shows all columns at the same width. I'll attache the rendered HTML, but the salient difference seems to be that the 3.3.1 version renders a columnGroup section in the table:

       

      {code:xml}

      <colgroup id="j_id2:colgroup:header">

            <col width="10%" />

            <col width="10%" />

            <col width="50%" />

            <col width="30%" />

            <col />

      </colgroup>

      {code}

       

      RF 4.0 doesn't have a section like that. Am I doing something wrong here, or is this a deficiency in RichFaces 4?