PagetTable issue


I am using vaadin 6.7.0.
I have a problem related to PagedTable.
The field which shows the current selected page is editable.
Why is this field editable?
If the number is just removed with backspace, I get NumberFormatException.
Also, if the if it is changed to some invalid number, I get NullPointerException.For example, there are 3 pages and some large number is entered.
How can we fix this at our end?
Is there a workaround for this?

Is there a newer version of PagedTable where this is fixed?
Help is very much appreciated.


the vaadin 7 version of the add-on seems to have a validator for the page number field. I guess this wasn’t backported to the vaadin 6 version.

But anyway, you can just copy the createControls method from PagedTable class and make the necessary changes yourself and not use the control bar provided by the add-on.

oddly, the Vaadin 7 version throws a java.lang.NumberFormatException: For input string: “10,001” when I click on “>>” (to go to last page) on a table with a million records (>10000 pages).

Worst part is that after the exception is thrown, paging stops working and none of the paging buttons (<<, <, >>, >) do anything anymore.

It seems the textfield where pagedtable puts the page number has a numberformat that changes with the locale (10.000 or 10,000) and that separator is then not recognized by java.lang.Integer.parseInt().