Take the 2-minute tour ×

I am spending alot of time positioning my Vaadin components and was wondering what other people's experiences when developing their own Vaadin applications was when layout out their GUIs.

share|improve this question
add comment

3 Answers

Regarding CSS positioning:

My experience/knowledge as a former Vaadin core developer, current Vaadin application designer/developer is that you shouldn't touch the positioning of the components using CSS, unless you use either CssLayout or CustomLayout.

Inside those layouts you can do pretty much anything CSS permits (Vaadin adds some inline sizes to the contained components, mind you), but with the other core layouts I advice that you don't try to do any fancy tricks unless you know the inner workings of the layout system intimately :)

For options to the core layouts, see the DashLayout and WeeLayout add-ons, which provide some additional freedom in terms of CSS styling.

But if you're talking positioning components using the Java API's then please clarify a bit where you're spending a lot of time.

share|improve this answer
One problem I have with amending the CSS is it seems like it is the one part of Vaadin that is likely to change with Vaadin 7 and later releases. Or will the CSS layouts stay the same in Vaadin 7? –  Zubair Apr 14 '11 at 8:08
Parts of the CSS will definitely change in Vaadin 7, if I have my will :) You can read some of the ideas I have planned from here: dev.vaadin.com/wiki/Vaadin7/Proposals/ThemingImprovements –  Jouni Apr 15 '11 at 12:19
ok, thanks, good read :) –  Zubair Apr 15 '11 at 18:44
add comment

Coming from desktop world the AbsoluteLayout using pixel positions and sizes has proven very straight-forward way to do component layouts.

That is a bit trade-off between Java-only layout and powerful web-style layout mechanism you get with CssLayout and CustomLayout, but you should get quite far by smartly mixing of these.

share|improve this answer
How does AbsoluteLayout help when dealing with different browser sizes though? –  Zubair Apr 14 '11 at 8:08
add comment

I only use css to style the background of some component or panel...
The main layout of my applications is usually looked like the AddressBook demo, sometimes look like iTunes. (with some splitpanel, expandratio or gridlayout)
And I use a lot of window (calling center() almost everytime).
I used to worry about the deep hierarchy of the component tree making it hard to do communication between components. But with the BlackBoard add-on, now it's easy.
I found this something interesting but never have time to try.
And I'm thinking of implementing some declarative form/table field factory (using xml).
imho, developing with vaadin is such a joy...

share|improve this answer
Are there any resources on the web which explain how the blackboard is used with Vaadin? –  Zubair Apr 13 '11 at 18:48
blackboard doesn't help dealing with the layout or the position of components (so if you're finding solutions for your layout, it's not)... But when there are lots of components (and we must put them on different layout or panel), blackboard help us to handle communication between those components by events-listeners. Look at the wiki of blackboard –  hope_is_grim Apr 13 '11 at 19:06
add comment

Your Answer


