ICEfaces
  1. ICEfaces
  2. ICE-3943

columnWidths not applied on ice:columns

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2, 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      XP SP3, FF3
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Workaround for me, patch the TableRenderer by replacing

      if (isScrollable(uiComponent) &&
         columnWitdths != null &&
         columnWitdths.hasMoreTokens()) {
         width = columnWitdths.nextToken();
      }

      with:

      if (columnWitdths != null &&
         columnWitdths.hasMoreTokens()) {
         width = columnWitdths.nextToken();
      }
      Show
      Workaround for me, patch the TableRenderer by replacing if (isScrollable(uiComponent) &&    columnWitdths != null &&    columnWitdths.hasMoreTokens()) {    width = columnWitdths.nextToken(); } with: if (columnWitdths != null &&    columnWitdths.hasMoreTokens()) {    width = columnWitdths.nextToken(); }

      Description

      TableRenderer puts always the hardcoded width 150px (Line: 659):

      String width = "150px;";
      if (isScrollable(uiComponent) &&
         columnWitdths != null &&
         columnWitdths.hasMoreTokens()) {
         width = columnWitdths.nextToken();
      }

        Issue Links

          Activity

          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #19890 Tue Dec 08 15:08:57 MST 2009 judy.guglielmin ICE-4481 updates TableRenderer for ICE-5013, ICE-4979, ICE-4916, ICE-3943, ICE-4306
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
          Brad Kroeger made changes -
          Link This issue blocks ICE-4979 [ ICE-4979 ]
          Ken Fyten made changes -
          Fix Version/s 1.8.2-RC1 [ 10210 ]
          Ken Fyten made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Assignee Priority P1
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          Re-instated original changes for this issue. The actual cause of regression was related to changes made for ICE-4916.

          Show
          Ken Fyten added a comment - Re-instated original changes for this issue. The actual cause of regression was related to changes made for ICE-4916 .
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #19241 Thu Sep 10 10:39:32 MDT 2009 yip.ng ICE-3943, ICE-4916: 4916 is real cause of regressions, so reinstated 3943 and reverted 4916 instead.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
          Hide
          yip.ng added a comment -

          Backed out original changes for now. Need more time to debug. (There were 48 differences in the diff.)

          Show
          yip.ng added a comment - Backed out original changes for now. Need more time to debug. (There were 48 differences in the diff.)
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #19235 Wed Sep 09 08:21:38 MDT 2009 yip.ng ICE-3943: Reverted changes for now because they caused a number of regressions.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
          Hide
          Ken Fyten added a comment -

          More details on the regression failures:

          ICE-3136: failed on IE and FF (works fine on Opera) - column.rendered is not interpreted inside a headerRow element
          ICE-3057: failed - columns are not resizable when resize: true clientOnly: false
          ICE-2371: failed on IE and FF (works fine on Opera) - things wrong with the column headers
          ICE-2234: failed on IE and FF (works fine on Opera) - things wrong with the column headers
          They seem all column headers related. The column header row disappears when multiple clicks apply to it. It affects column resizable and sortable on IE and FF. Opera is fine.

          Show
          Ken Fyten added a comment - More details on the regression failures: ICE-3136 : failed on IE and FF (works fine on Opera) - column.rendered is not interpreted inside a headerRow element ICE-3057 : failed - columns are not resizable when resize: true clientOnly: false ICE-2371 : failed on IE and FF (works fine on Opera) - things wrong with the column headers ICE-2234 : failed on IE and FF (works fine on Opera) - things wrong with the column headers They seem all column headers related. The column header row disappears when multiple clicks apply to it. It affects column resizable and sortable on IE and FF. Opera is fine.
          Ken Fyten made changes -
          Assignee Priority P2 P1
          Ken Fyten made changes -
          Assignee Adnan Durrani [ adnan.durrani ] Yip Ng [ yip.ng ]
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Ken Fyten added a comment -

          The change for this issue is causing the following regression test failures using IE7 and FF2:

          ICE-3136: failed on IE and FF (works fine on Opera) - column.rendered is not interpreted inside a headerRow element
          ICE-3057: failed - columns are not resizable when resize: true clientOnly: false
          ICE-2371: failed on IE and FF (works fine on Opera) - things wrong with the column headers
          ICE-2234: failed on IE and FF (works fine on Opera) - things wrong with the column headers

          Show
          Ken Fyten added a comment - The change for this issue is causing the following regression test failures using IE7 and FF2: ICE-3136 : failed on IE and FF (works fine on Opera) - column.rendered is not interpreted inside a headerRow element ICE-3057 : failed - columns are not resizable when resize: true clientOnly: false ICE-2371 : failed on IE and FF (works fine on Opera) - things wrong with the column headers ICE-2234 : failed on IE and FF (works fine on Opera) - things wrong with the column headers
          Hide
          Joanne Bai added a comment -

          Verified with success on ICEfaces trunk revision 19228 + tomcat6.0

          Tested on FF3.5, IE6 and IE7

          Test app committed to repo\qa\trunk\Regression\ICE-3943

          Show
          Joanne Bai added a comment - Verified with success on ICEfaces trunk revision 19228 + tomcat6.0 Tested on FF3.5, IE6 and IE7 Test app committed to repo\qa\trunk\Regression\ ICE-3943
          Adnan Durrani made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Adnan Durrani added a comment -

          Fix added so the "width" will be apply on each column defined to the "columnWidths" attribute, regardless of the any combination of column and columns component.

          Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
          Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
          Completed: At revision: 19203

          Show
          Adnan Durrani added a comment - Fix added so the "width" will be apply on each column defined to the "columnWidths" attribute, regardless of the any combination of column and columns component. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Completed: At revision: 19203
          Adnan Durrani made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #19203 Tue Sep 01 05:34:51 MDT 2009 adnan.durrani Fix for ICE-3943 (columnWidths not applied on ice:columns)
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
          Ed Hillmann made changes -
          Attachment 3943-TableRenderer-UIColumns.patch [ 11933 ]
          Hide
          Ed Hillmann added a comment -

          Hi. I've attached a patch that allows the columnWidths attribute to be applied to a table that uses a UIColumns component (as opposed to defining individual UIColumn components). This works in my environment, as it also works for the attached example WAR file. The changes are contained within the file component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java. I've made this against the 1.8.1 version of the ICEfaces source.

          Show
          Ed Hillmann added a comment - Hi. I've attached a patch that allows the columnWidths attribute to be applied to a table that uses a UIColumns component (as opposed to defining individual UIColumn components). This works in my environment, as it also works for the attached example WAR file. The changes are contained within the file component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java. I've made this against the 1.8.1 version of the ICEfaces source.
          Ken Fyten made changes -
          Fix Version/s 1.8.2 [ 10190 ]
          Assignee Priority P2
          Assignee Adnan Durrani [ adnan.durrani ]
          Arran Mccullough made changes -
          Attachment Case8549Example.war [ 11911 ]
          Hide
          Arran Mccullough added a comment -

          Attached test case that shows the columnWidths not being applies properly to a table using <ice:columns/> component. Also has a table that uses the <ice:column/> component and it is working properly.

          Show
          Arran Mccullough added a comment - Attached test case that shows the columnWidths not being applies properly to a table using <ice:columns/> component. Also has a table that uses the <ice:column/> component and it is working properly.
          Arran Mccullough made changes -
          Affects Version/s 1.8.1 [ 10170 ]
          Arran Mccullough made changes -
          Field Original Value New Value
          Salesforce Case [50070000009f5Gc]
          Hide
          Tobias Schafer added a comment -

          I've found a new problem, because i was using before always the same width for my columns.

          My list of columns widths looks like this:
          <ice:dataTable
          columnWidths="30px,50px,100px" ...

          Using the <ice:columns> tag only the first defined width is apllied on all my columns:

          <tr>
          <th style="width: 30px;" />
          <th style="width: 30px;" />
          <th style="width: 30px;" />
          </tr>

          Show
          Tobias Schafer added a comment - I've found a new problem, because i was using before always the same width for my columns. My list of columns widths looks like this: <ice:dataTable columnWidths="30px,50px,100px" ... Using the <ice:columns> tag only the first defined width is apllied on all my columns: <tr> <th style="width: 30px;" /> <th style="width: 30px;" /> <th style="width: 30px;" /> </tr>
          Hide
          Tobias Schafer added a comment -

          with the <ice:column> there is no problem, but with the <ice:columns>

          Show
          Tobias Schafer added a comment - with the <ice:column> there is no problem, but with the <ice:columns>
          Hide
          Krashan Brahmanjara added a comment -

          I don't see any problems. Use numer of columntWitdth's equal to number of columns.

          Show
          Krashan Brahmanjara added a comment - I don't see any problems. Use numer of columntWitdth's equal to number of columns.
          Tobias Schafer created issue -

            People

            • Assignee:
              yip.ng
              Reporter:
              Tobias Schafer
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: