Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0
-
Fix Version/s: 2.1-Beta, 3.0, EE-1.8.2.GA_P04, EE-2.0.0.GA_P01
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Tomcat 6.0, Spring Security 3.0, IceFace 2.0
-
Assignee Priority:P2
-
Workaround Exists:Yes
-
Workaround Description:
Description
I use the dataPaginator with a panelSeries. The Data behind the panelSeries is a list, which im going to filter. It works fine until i do the filtering on a page >firstPage. I get a java.lang.IllegalArgumentException with a negative Value. I think the issue is in the DataPaginator.broadcast function.
Thats the Code from your svn:
177: } else {
178: int pageCount = getPageCount();
179: if (pageindex > pageCount) {
180: pageindex = pageCount;
181: } else if (pageindex <= 0) {
182: pageindex = 1;
183: }
184: uiData.setFirst(uiData.getRows() * (pageindex - 1));
In my case the pageCount is 0 and pageindex=12 so after the if,else if the pageIndex is 0. In mathematic words if uiData.getRows>0 and pageindex-1<0 the result will be negative.
I think the solution is to change the code to:
177: } else {
178: int pageCount = getPageCount();
179: if (pageindex > pageCount) {
180: pageindex = pageCount;
181: }
182: if (pageindex <= 0) {
183: pageindex = 1;
184: }
185: uiData.setFirst(uiData.getRows() * (pageindex - 1));
Hopefully my solution is the right so you only have to change it shortly and we will be happy (especially me)
Thats the Code from your svn:
177: } else {
178: int pageCount = getPageCount();
179: if (pageindex > pageCount) {
180: pageindex = pageCount;
181: } else if (pageindex <= 0) {
182: pageindex = 1;
183: }
184: uiData.setFirst(uiData.getRows() * (pageindex - 1));
In my case the pageCount is 0 and pageindex=12 so after the if,else if the pageIndex is 0. In mathematic words if uiData.getRows>0 and pageindex-1<0 the result will be negative.
I think the solution is to change the code to:
177: } else {
178: int pageCount = getPageCount();
179: if (pageindex > pageCount) {
180: pageindex = pageCount;
181: }
182: if (pageindex <= 0) {
183: pageindex = 1;
184: }
185: uiData.setFirst(uiData.getRows() * (pageindex - 1));
Hopefully my solution is the right so you only have to change it shortly and we will be happy (especially me)
Would someone be able to point me to the workaround until this is not fixed?
Thank you