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

          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.
          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
          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
          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.
          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.
          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
          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
          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
          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.
          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.)
          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 .

            People

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

              Dates

              • Created:
                Updated:
                Resolved: