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.
toggling panel content visibility different/not working under 7.6.0
Problem
- toggling panel content visibility different/not working under 7.6.0
Just promoted to Vaadin 7.6.0 (from Vaadin 7.5.10):
- JDK: 8
- Tomcat: 8.0.30
- Vaadin 7.6.0 [[url=http://vaadin.com/download/release/7.6/7.6.0/release-notes.html]release notes]
We used to be able to toggle the visibility of a Panel's content with the following:
panel.getContent().setVisible(!panel.getContent().isVisible());
With Vaadin 7.5.10 the behavior would be:
- In expanded mode the panel would be shown with the standard panel caption bar.
- In collapsed mode (content not visible) the panel would be presented with only the caption bar - all of its contents would be not visible and the screen space occupied by the panel's content would be available for other elements on the page.
Since upgrading to Vaadin 7.6.0 this behavior does not seem to work. The same logic is applied but the content is still visible.
When we reverted to Vaadin 7.5.10, the expected behavior returned.
Any suggestions?
Sounds like a regression to me. I though couldn't reproduce it easily. I tried following code:
@Override
protected void init(VaadinRequest vaadinRequest) {
final VerticalLayout layout = new VerticalLayout();
Panel panel = new Panel("Paneeli");
panel.setContent(new VerticalLayout(new Label("Content")));
Button button = new Button("Toggle");
button.addClickListener( e -> {
panel.getContent().setVisible(!panel.getContent().isVisible());
});
layout.addComponents(panel, button);
layout.setMargin(true);
layout.setSpacing(true);
setContent(layout);
}
Could you extract a small test case how to reproduce the issue and fill in a ticket to dev.vaadin.com? The team is busy doing the first maintenance release for 7.6 series, it would be great to get this fixed in it.
cheers,
matti
Hi Matti,
I wrote a small app with content similar to yours, using Vaadin 7.6.0. I see good results.
However, when I do the same type of example in my application there is a problem with 7.6.0.
It may be related to PUSH under 7.6.0.
Please have a look at issue: 11725516.
Thank you,
John
Not sure if it is related but there was an old, broken change which was accidentally included in 7.6.0. The change breaks layouts in certain cases, so you should try 7.6-SNAPSHOT or 7.6.1 once it's out, might just be that the issue is fixed there
Hello Artur,
By recompiling widgetset, as you suggested on a related thread, this problem went away. Recall building with 7.6.0 but at runtime the client side reporting 7.5.8.
Thanks for your attention on this.
- John