I found an issue with the following case. I use crud.setFindAllOperation to pass a collection of objects to the crud grid. Then I add a new item to the collection on the server side (not using Crud functionality). I expect that grid will be automatically refreshed and a new row will be added. Current Crud implementation breaks this case. Setting items to the grid in refreshGrid method (grid.setItems(items);) breaks automatic refresh of the grid by Vaadin NotificationListeners. I suggest to rewrite attach and refreshGrid methods in the following way:
@Override
public void attach() {
super.attach();
items = findAllOperation.findAll();
grid.setItems(items);
}
public void refreshGrid()
{
grid.getDataProvider().refreshAll();
}
I found an issue with the following case. I use crud.setFindAllOperation to pass a collection of objects to the crud grid. Then I add a new item to the collection on the server side (not using Crud functionality). I expect that grid will be automatically refreshed and a new row will be added. Current Crud implementation breaks this case. Setting items to the grid in refreshGrid method (grid.setItems(items);) breaks automatic refresh of the grid by Vaadin NotificationListeners. I suggest to rewrite attach and refreshGrid methods in the following way: