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

        Andrew Chan created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case [5007000000GDmKm]
        Affects Version/s 2.0.1 [ 10255 ]
        Affects Version/s 2.0.0 [ 10230 ]
        Arran Mccullough made changes -
        Attachment Case10054Example.war [ 13128 ]
        Attachment icefaces-2.0.1.JPG [ 13129 ]
        Attachment icefaces-beta-1.JPG [ 13130 ]
        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.
        Ken Fyten made changes -
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Fix Version/s 2.1 [ 10241 ]
        Affects Version/s EE-2.0.0.GA [ 10263 ]
        Ken Fyten made changes -
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24994 Sun Jul 10 20:23:15 MDT 2011 adnan.durrani Fix for ICE-6288 (Scrollable ice:dataTable header row - columnWidths value is not skipped for non-rendered ice:column)
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24995 Sun Jul 10 20:27:23 MDT 2011 adnan.durrani Fix for ICE-6288 (Scrollable ice:dataTable header row - columnWidths value is not skipped for non-rendered ice:column) to icefaces2 branches
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Adnan Durrani [ adnan.durrani ] yip.ng [ yip.ng ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25289 Fri Aug 19 15:15:48 MDT 2011 yip.ng ICE-6288: Scrollable ice:dataTable header row - columnWidths value is not skipped for non-rendered ice:column.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25290 Fri Aug 19 15:16:16 MDT 2011 yip.ng ICE-6288: Scrollable ice:dataTable header row - columnWidths value is not skipped for non-rendered ice:column.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        yip.ng made changes -
        Attachment screenshot-03.png [ 13445 ]
        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
        yip.ng made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: