ICEfaces
  1. ICEfaces
  2. ICE-1280

TableRenderer calling UIData.setRowIndex one too many times when paging.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.6DR#4, 1.6
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any

      Description

      Noted in the following forum posts:

      http://www.icefaces.org/JForum/posts/list/3314.page
      http://www.icefaces.org/JForum/posts/list/3820.page
      http://www.icefaces.org/JForum/posts/list/2895.page
      http://www.icefaces.org/JForum/posts/list/3280.page

      TableRenderer.encodeChildren calls the setRowIndex for rows pageIndex*(0-10) when it should only be calling pageIndex*(0-9)

      The following patch is suggested:

      TableRenderer.java 2007-02-23 11:08:36.000000000 -0700
      @@ -330,13 +330,17 @@
               }
       
               String columnStyles[] = getColumnStyleClasses(uiComponent);
               int columnStyleIndex = 0;
               int columnStylesMaxIndex = columnStyles.length - 1;
               while (uiData.isRowAvailable()) {
      - String selectedClass =null;
      + if ((numberOfRowsToDisplay > 0) &&
      + (countOfRowsDisplayed >= numberOfRowsToDisplay)) {
      + break;
      + }
      + String selectedClass =null;
                   Iterator childs = uiData.getChildren().iterator();
                   Element tr = (Element) domContext.createElement(HTML.TR_ELEM);
                   if (rowSelectorFound) {
                       tr.setAttribute("onclick", rowSelectionFunctionName + "('" +
                                                  uiData.getRowIndex() + "');");
                   }
      @@ -432,17 +436,12 @@
                           }
                       }
       
                   }
                   rowIndex++;
                   countOfRowsDisplayed++;
      - if (numberOfRowsToDisplay > 0
      - && countOfRowsDisplayed >= numberOfRowsToDisplay) {
      - break;
      - }
      -
                   uiData.setRowIndex(rowIndex);
               }
               uiData.setRowIndex(-1);
               domContext.stepOver();
               domContext.streamWrite(facesContext, uiComponent);
           }

        Activity

        Philip Breau created issue -
        Philip Breau made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ] Adnan Durrani [ adnan.durrani ]
        Philip Breau made changes -
        Support Case References 3929
        Support Customer Ref. #s 714
        Adnan Durrani made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.6DR#1 [ 10035 ]
        Resolution Fixed [ 1 ]
        Frank Ye made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Assignee Priority P1
        Ken Fyten made changes -
        Fix Version/s 1.6DR#4 [ 10060 ]
        Adnan Durrani made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Cannot Reproduce [ 5 ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Fix Version/s 1.6DR#1 [ 10035 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: