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)
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Eval Uate
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | EE-2.0.0.GA_P01 [ 10271 ] | |
Fix Version/s | 2.1 [ 10241 ] | |
Assignee Priority | P2 | |
Assignee | yip.ng [ yip.ng ] |
yip.ng
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | EE-1.8.2.GA_P04 [ 10280 ] |
yip.ng
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 2.1-Beta [ 10291 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |