I tried the new Vaadin 7 RC2 and have big problems with the HorizontalLayout component.
I just doesn’t work. The HorizontalLayout works like a VerticalLayout in my case.
In my extended UI class I have the following code in the init-method;
@Override
protected void init(VaadinRequest request) {
setSizeFull();
HorizontalLayout main = new HorizontalLayout();
main.setSizeFull();
main.addComponent(new Label("Component1"));
main.addComponent(new Label("Component2"));
setContent(main);
}
I attach a screenshot to show how the components are written on the page.
Just like a VerticalLayout. The code is very basic just to test why this doesn’t work.
My real application looks different, but I wanted to check if I hade any issues in my
code, but when the above code I get the same confusing results. I can not be the
only one that has this problem? The HorizontalLayout is a very central component
that is used very often…
Se attached image.
EDIT: When i checked the source in chrome I checked and saw the labels was 100% width.
I then tried to set the setSizeUndefined-method on the labels. After that the labels wasn’t
100% width anymore, but I still got the same result. The HorizontalLayout works like a
VerticalLayout.
Make sure you have refreshed everything (including browser caches) and there is no copy of a Vaadin 6 theme extracted from the JARs or something like that on the server.
You didn’t give much of your stylesheet, but you could read through
this tutorial carefully if you haven’t already - it shows both how to use legacy-styles.css and how to do “pure” Vaadin 7 SCSS themes (importing reindeer.scss, including the mix-in in a suitable block, …) as well as how to compile a theme for production mode.
EDIT: … and make sure you also have a dependency on theme-compiler - either directly or indirectly.