Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.5.3
-
Component/s: ICE-Components
-
Labels:None
-
Environment:any
-
ICEsoft Forum Reference:
-
Support Case References:3929
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);
}
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);
}
sorry, that diff was backwards:
— TableRenderer.java 2007-02-26 11:43:44.000000000 -0700
@@ -330,17 +330,13 @@
}
String columnStyles[] = getColumnStyleClasses(uiComponent);
int columnStyleIndex = 0;
int columnStylesMaxIndex = columnStyles.length - 1;
while (uiData.isRowAvailable()) {
+ String selectedClass =null;
Iterator childs = uiData.getChildren().iterator();
Element tr = (Element) domContext.createElement(HTML.TR_ELEM);
if (rowSelectorFound) { tr.setAttribute("onclick", rowSelectionFunctionName + "('" + uiData.getRowIndex() + "');"); }
@@ -436,12 +432,17 @@
}
}
}
{ + break; + }rowIndex++;
countOfRowsDisplayed++;
+ if (numberOfRowsToDisplay > 0
+ && countOfRowsDisplayed >= numberOfRowsToDisplay)
+
uiData.setRowIndex(rowIndex);
}
uiData.setRowIndex(-1);
domContext.stepOver();
domContext.streamWrite(facesContext, uiComponent);
}