ICEfaces
  1. ICEfaces
  2. ICE-7575

TDs of first Row from ace:dataTable does not get StyleClass from ace:column directly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.RC1
    • Fix Version/s: 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Java 1.6, Apache Tomcat 7.0.23
    • Assignee Priority:
      P1

      Description

      As you can see in my example - the content of the first row in wrapped in a div with the CSS class I gave my ace:column instead of just set it to the TD - like it does for the others. I think thats an issue that should be fixed.

      XHTML:
      <ace:dataTable value="#{bean.items}"
      var="item"
      styleClass="table">

        <ace:column styleClass="first">
          <f:facet name="header">
            Header Text
          </f:facet>
          #{item.something}
      </ace:dataTable>

      HTML Output:
      <div class="... table" ...>
      <table>
      <thead>
      <tr>
      <th class="ui-widget-header first">Header Text</th>
      </tr>
      </thead>
      <tbody>
      <tr class="ui-datatable-even">
      <td>
      <div class="first">First Row Something</div>
      </td>
      </tr>
      <tr class="ui-datatable-odd">
      <td class="first">Second Row Something</td>
      </tr>
      <tr class="ui-datatable-even">
      <td class="first">Third Row Something</td>
      </tr>
      </tbody>
      </table>
      </div>

        Activity

        Hide
        Tobias Tempel added a comment -

        in 'org.icefaces.ace.component.datatable.DataTableRenderer' in the 'encodeRow' method i find the line
        encodeRegularCell(context, table, columns, kid, clientId, selected, (rowIndex == 0));
        which causes 'encodeRegularCell' method to call
        writer.startElement(HTML.DIV_ELEM, null);
        and thus inserting this <div> tag (which is quite annoying for me).

        cheers - tobias

        Show
        Tobias Tempel added a comment - in 'org.icefaces.ace.component.datatable.DataTableRenderer' in the 'encodeRow' method i find the line encodeRegularCell(context, table, columns, kid, clientId, selected, (rowIndex == 0)); which causes 'encodeRegularCell' method to call writer.startElement(HTML.DIV_ELEM, null); and thus inserting this <div> tag (which is quite annoying for me). cheers - tobias
        Hide
        Nils Lundquist added a comment - - edited

        Fixed location of column styleClass for first row.

        The divs present in the first row of the table are required to size body columns when using the scrollable feature and cannot be removed. However, they have been changed to only render when scrollable is enabled.

        Revision #27336
        ICE-7575 - Adjusted rendering of 1st row divs needed for scrollable table sizing. StyleClass now correctly applied, and divs render only when scrollable is enabled.

        Show
        Nils Lundquist added a comment - - edited Fixed location of column styleClass for first row. The divs present in the first row of the table are required to size body columns when using the scrollable feature and cannot be removed. However, they have been changed to only render when scrollable is enabled. Revision #27336 ICE-7575 - Adjusted rendering of 1st row divs needed for scrollable table sizing. StyleClass now correctly applied, and divs render only when scrollable is enabled.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Jan Glaubitz
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: