I create simple grid with data from database:
BeanItemContainer<Customer> container = new BeanItemContainer<>(Customer.class, customerRepository.findAll());
Grid grid = new Grid(container);
To edit each row the button was created:
Button edit = new Button("Edit", clickEvent -> openWindow((Customer) grid.getSelectedRows().iterator().next()));
This open new window with edit form. After all changes accepted, I must manually refresh whole page to see modification on Grid. My question is:
How refresh only Grid after modification of any row entry?
And how save those modifications to database (maybe beanItemContainer could do it)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…