Hiding/removing components issue

Hi! I am working with Vaadin 6 and Tomcat. I have a Panel with 2 components: SearchComponent and EditionComponent.

First I do the search, and when I select one search result, I remove the SearchComponent, and create a new EditionComponent. If I click on “Cancel” button on EditionComponent, I try to remove EditionComponent and add to the layout the SearchComponent again (with all filters and data).

Then I have an “Out of sync” error.

What am I doing wrong? Is this the proper way to remove/hide/add components in Vaadin??

Thanks in advance.

Best regards,


Depends what you wish to do.
But there is a setVisible() method which allos you to show/hide components.

Removing a component with it’s own events and readding them can cause issues, better create a new component and add that one.


Please do not post the same question to multiple threads - see the forum guidelines. Also, do not post a question to an old thread that is not relevant to the question.

Your question was already answered