Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Table object update
Hi All,
I am still relatively new to Vaadin so please forgive my ignorance. I have designed a layout which contain a table and a form. I am using BeanEntityContainer as the data source for the table and bind the bean to the form. When I update the form bind.commit(), I am expecting the table to be updated with the new form values. Is there a step or two I'm missing?
Thanks.
I was able to update the table row using table function refreshCache().
Now I have a differnt issue. I thought by updating the table data source that the table will refresh and show the newly inserted bean. Can someone please help? Thanks.
addressForm.getSaveButton().addClickListener(listener -> {
if (addressForm.isNewAddress()) {
// Insert
this.container.addBean(addressForm.getAddress());
addressForm.setNewAddress(false);
}
table.refreshRowCache();
});
Hi,
I'm also very new to Vaadin (7.5.7) and have a similiar problem.
I have a simple "customers" table in MySQL database. I'm able to display the whole table with the help of TableQuery.
String theTable = "customers";
SQLContainer sqlContainer = null;
try {
sqlContainer = new SQLContainer(new TableQuery(theTable, connectionPool));
} catch (SQLException e) {
e.printStackTrace();
}
tableDist.setCaption(theTable);
tableDist.setContainerDataSource(sqlContainer);
Could you guide how I can prepare add/delete/update operations on this table? or, Do I have to prepare new application for each table?
Thanks,