ICEfaces
  1. ICEfaces
  2. ICE-6288

Scrollable ice:dataTable header row - columnWidths value is not skipped for non-rendered ice:column

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2, 2.0.0, 2.0.1, EE-2.0.0.GA
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows 7, Vista, XP, Mac OS X; Netbeans 6.9, Glassfish 3.0.1; IE8, IE7, Firefox 3.x (Windows), Safari 5.0.3 (Windows), Chrome (Windows)
    • Assignee Priority:
      P1

      Description

      Starting with the ICEFaces 2.0-Beta 2 release, there is a change in the generated HTML of ice:dataTable that is probably meant to be an improvement, but the change does not go far enough and thus, generates a bug as described below.

      I have an ice:dataTable that is scrollable and thus has defined column widths such as "50px,100px,200px,300px" for the columns in the table. However, the table contains an ice:column that has a "rendered=" parameter and may or may not be rendered depending on a backing bean EL expression:

      <ice:dataTable
          id="eeDataTable"
          value="#{checkPrinting.dataModel}"
          var="row"
          resizable="false"
          border="0"
          scrollable="true"
          scrollFooter="false"
          scrollHeight="176px"
          columnWidths="50px,100px,200px,300px"
          styleClass="listTable"
          columnClasses="listTableCol">

          <ice:column>
              <f:facet name="header">
      <ice:outputText value="Employee" />
      </f:facet>

      <ice:outputText value="#{checkPrinting.eeDisplayName}" title="#{checkPrinting.eeDisplayName}" />
          </ice:column>

          <ice:column id="foobar" rendered="#{checkPrinting.showVoucherNumberColumn}">
              <f:facet name="header">
      <ice:outputText value="Check Number"/>
              </f:facet>

              <ice:panelGroup>
      <ice:inputText size="8" maxlength="8" value="#{row.voucherNumber}" partialSubmit="true" valueChangeListener="#{checkPrinting.saveByRowEvent}" />
              </ice:panelGroup>
          </ice:column>

          <ice:column>
              <f:facet name="header">
      <ice:outputText value="Pay Date1" />
      </f:facet>

      <ice:outputText value="#{row.checkDate1AsString}"/>
          </ice:column>

          <ice:column>
              <f:facet name="header">
      <ice:outputText value="Pay Date2" />
      </f:facet>

      <ice:outputText value="#{row.checkDate2AsString}"/>
          </ice:column>
      </ice:dataTable>

      Starting with 2.0-Beta 2, when an ice:column is not rendered due to a backing bean condition, the generated HTML now appears to know to skip the column width value that is associated with that column supplied in the "columnWidths=" parameter of ice:dataTable. In the above example, the generated <TD>'s for the data rows use the 50px, 200px, and 300px column width values and skips 100px because that column with id "foobar" is told not to render.

      However, the above table is scrollable and thus has a separate <DIV> for the header row. Unfortunately, the generated HTML for the header row does not know to skip the same 100px column width value. Instead, it just uses the first three values in the "columnWidths=" parameter. Thus, the column widths for the header row are different (and wrong) from the column widths for the data rows.

      Prior to 2.0-Beta 2, the data rows did not automatically skip the column width value for an unrendered column. This was fine, as I was able to assign the "columnWidths=" parameter to an backing bean method that generated the appropriate string (e.g. "50px,100px,200px,300px" or "50px,200px,300px") depending on whether a column was meant to be rendered or not.

        Activity

        Hide
        Arran Mccullough added a comment -

        The changes from ICE-5951/ICE-2283 aren't applied to the header columns for a scrollable table. They seem to be just applied to the table content section.

        Show
        Arran Mccullough added a comment - The changes from ICE-5951 / ICE-2283 aren't applied to the header columns for a scrollable table. They seem to be just applied to the table content section.
        Hide
        Adnan Durrani added a comment -

        Command: Commit
        Modified: D:\work\development\head\svn\ossrepo\icefaces2\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces2\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Completed: At revision: 24994

        Command: Commit
        Modified: D:\work\development\head\svn\ossrepo\icefaces2\branches\icefaces-2.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces2\branches\icefaces-2.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Completed: At revision: 24995

        Show
        Adnan Durrani added a comment - Command: Commit Modified: D:\work\development\head\svn\ossrepo\icefaces2\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces2\trunk\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Completed: At revision: 24994 Command: Commit Modified: D:\work\development\head\svn\ossrepo\icefaces2\branches\icefaces-2.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces2\branches\icefaces-2.0.x-maintenance\icefaces\compat\components\src\main\java\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Completed: At revision: 24995
        Hide
        Ken Fyten added a comment -

        Changes for this fix are causing the regression in ICE-7136.

        Show
        Ken Fyten added a comment - Changes for this fix are causing the regression in ICE-7136.
        Hide
        yip.ng added a comment -

        Re-fixed. See screenshot 3. The previous fix affected logic of <ice:columns> rendering as well, instead of just <ice:column> itself.

        Revision: 25289


        Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java

        Revision: 25290


        Modified : /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java

        Show
        yip.ng added a comment - Re-fixed. See screenshot 3. The previous fix affected logic of <ice:columns> rendering as well, instead of just <ice:column> itself. Revision: 25289 Modified : /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java Revision: 25290 Modified : /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java

          People

          • Assignee:
            yip.ng
            Reporter:
            Andrew Chan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: