Hi
We are currently using Vaadin 7.5.9 with spring boot 1.3.1 and we are now trying to upgrade tot he latest version of vaadin, that is 7.6.1 if am not mistaken. Doing this we ran into a problem with the grid and I would love it if you could tell us with we need to do something different with the new version.
What we are doing is that we have some data in the grid that is jpa entities that we grab from the database. This works well int he current version. We use MVP and in the presenter we call a spring service to get the entities.
And the problem is that when we do a delete we get a:
java.lang.NullPointerException
at com.vaadin.data.util.GeneratedPropertyContainer$GeneratedPropertyItem.getItemProperty(GeneratedPropertyContainer.java:144) ~[vaadin-server-7.6.1.jar:7.6.1]
and in the vaadin client side debugger we see:
Error performing server to cleint RPC calls java.lang.IndexOutOfBoundsException: The given row range (0…21) was outside the current number of rows (20)
What we do in the delete function is that we call the spring services to delete the current entity fromt he db and then we ask the grid to be refreshed by calling the underlying BeanItemController and removing all items and then fetch the entities from the db again and add them to the BeanItemController. Not the most efficient way but simple, in this case it doesn’t need to be efficient.
In this case we had 21 rows in the grid before the delete and then 20 after deletion.
Should we do this in a different manner with the new version? What is the recommended way?
Best Regards
Jani Väinölä