setting layout visibility to false should hide all added components ?

Hi,

I am seeing behaviour where doing myLayout.setVisible(false) in fact does not hide the components added to that layout. It does seem to work for a few occasions, but not others. Is this supported functionality at all or are we not supposed to ‘hide’ layouts ?

Thanks
Jorg

Sounds really strange, hiding layouts should be perfectly fine. Can you supply a small test case and description of your environment (OS, browser, Vaadin version etc.)?

OK I will try, extracting it from the application is a bit tricky it will take a bit of time.

Basically i am using the event router to send custom events around to listeners, and in these listeners depending on the event data i determine component visibility. Also most of my application level widgets are extending a base layout class, i have switched to using a custom component instead and it does seem to have less layout surprises and generally is a cleaner solution.

Not sure how you use the event router (within an application instance or between applications), but if you are updating the UI from another thread (e.g. a request to another application instance), you need to use a push or pull solution to have the changes delivered to the browser.

See
this post
, and don’t forget to synchronize to the Application instance.