I have a task running that updates by table data periodically. The data is updated fine but I have to click on the table for the new data to display otherwise the old data remains displayed in the table.
I have tried removing all items from the BeanItemContainer and putting them back, recreating a new Bean container, and attempting to select an item in the table. Nothing works but a mouse click on an item in the table within the client.
Update code below:
public void gatherAlerts() {
List<Alert> alerts = Backend.getAlerts(counter++);
if (container == null) {
container = new BeanItemContainer<Alert>(Alert.class, alerts);
alertTable.setContainerDataSource(container);
} else {
container = (BeanItemContainer) alertTable.getContainerDataSource();
container.removeAllItems();
container.addAll(alerts);
alertTable.select(container.firstItemId());
}
}