collapsing columns in a table

Hi, I’m new to Vaadin and I like it very much!
I’m developing an application starting from incubator SpringApplication.
I have a table with setColumnCollapsingAllowed(true). I insert new records through a form. After inserting a new row, I reload data from db and call setContainerDatasorce with the new container:

setContainerDataSource(createContainer(myService.find()));

where createContainer returns a new IndexedContainer with the List returned by myService.find()

after doing that, columns previously collapsed by the user are now visible. How can I refresh data keeping the columns collapsed?

Thank you, Francesco

If you change the data source for the Table you will efficiently reset all related table configuration like visible and collapsed columns. If you instead update the container contents the table configuration should stay intact.

Artur,
thank you for your quick answer. Solved!
Francesco