Hello,
I am getting the below error while accessing the page.
java.lang.NullPointerException
at org.vaadin.klaudeta.PaginatedGrid.doCalcs(PaginatedGrid.java:53)
at org.vaadin.klaudeta.PaginatedGrid.onAttach(PaginatedGrid.java:45)
i am a new for vaadin and not sure am i doing any mistakes.
Thank you.
Hi,
It is actually a bug. Thanks for your help identifying it.
It happens when grid.setItem is being called after the grid has already been attached/added into the layout. I’ll fix it of course but meanwhile as a workaround can you call the grid.setItem before you actually add the grid into the layout.
Another thing I noticed in you code above is that you are doing this
In you case the grid will always have just one page, but if you normally set the result as they are with grid.setItem(result) then the internal of the PaginatedGrid with take care of doing the calculations.