Reputation: 11928
There's StackExchange button with a dropdown layout on this site on the top-left side. If you click on it, it opens, if you click on somewhere else, it's hidden. Is it possible to create a similar composition in vaadin application given a button and layout?
Two conditions are:
Know the state of the layout(hidden or shown) from the code(that's why javascript is not appropriate).
Button should expand and hide the layout and the rest area on the click should only hide it(the same as here with the StackExchange button).
Does anyone know the solution? Thanks a lot.
Upvotes: 1
Views: 4423
Reputation: 3155
Two posibilities :
Native Vaadin : PopupView. Here's an example of using it in the Vaadin Sampler. No control over the placing of the popup, and showing the popup can't be controlled by anything other than the view itself.
Vaadin Addon : Overlays Allows you to overlay any component (e.g. a layout) relative to any other component, can can be controlled by a seaprate component (e.g. a button)
Upvotes: 1