What steps will reproduce the problem?
1. Open the example Grid with Local Paging.
2. Enter something else than an integer in the page size, i.e. 7.2
3. Press enter
The expected output could be that the user isn't allowed to enter "." as
with letters. Or add a check:
String sPageSize = field.getValueAsString());
int index = sPageSize.indexOf(".");
if (index>-1){
if(index==0){
int pageSize = 0;
}
else{
int pageSize = Integer.parseInt(sPageSize.substring(0, index - 1));
}
pagingToolbar.setPageSize(pageSize);
}
While doing a sollution I also noticed that the example also doesn't like
when the user enters a "0".
Just add:
if (pageSize == 0) pageSize = 1;
Best regards
Christian Falck
Original issue reported on code.google.com by christia...@gmail.com on 2 Jun 2008 at 4:07
Original issue reported on code.google.com by
christia...@gmail.com
on 2 Jun 2008 at 4:07