update vaadin grid when new record added to database
问题 I want to add the element to the table in the database and update the grid with new data (probably I should add records directly on UI to the table but whatever). My grid component looks like this @SpringComponent public class PlayersGrid extends Grid<Player> { @PostConstruct public void afterInit() { addColumn(Player::getId).setHeader("ID"); addColumn(Player::getName).setHeader("Name"); addColumn(Player::getCharacterClass).setHeader("Class"); addColumn(Player::getLevel).setHeader("Level"); }