Hello all,
I am looking for help or suggestion with using CSS layout. I use all Vaadin layouts with no problem, but I have no idea where to start with CSS layout. Example in the “book of vaadin” for CSS layout does not look like anything you would use in real life so I still haven’t seen CSS layout example. Recently I improved my CSS knowledge and now I am eager to try to use it in my Vaadin aps. I have couple of questions:
-
Is it possible to use CSS layout without overriding its getCss() method? Overriding it and doing “if component return …” looks cumbersome if you have more than few components. Are there any alternatives? Why can’t I use addStyleName and define style in styles.css file?
-
Would it be possible to build complex screens using CSS layout? For example:
[size=1]
[font=courier new]
+---------------------------------------------------------+
| |
+---------+-----------------------------------------------+
| | |
| | +-------+ +---------+ +----------+ |
| | +-------+ +---------+ +----------+ |
| | |
| | +----------------------+ +----------+ |
| | +----------------------+ +----------+ |
| | |
| | +------------------------------------+ |
| | |table | |
| | +------------------------------------+ |
| | |------------------------------------| |
| | |------------------------------------| |
| | |------------------------------------| |
| | |------------------------------------| |
| | +------------------------------------+ |
| | |
+---------+-----------------------------------------------+
[/font]
[/size]
This is a screen with side bar, top bar few fields and a table. I can easyly build this by combinig Vertical and horizontal layouts but I hope CSS layout could be more effcient. There are two types of problem here: a) general screen layout and b) fields layout. Would it be posisible to solve problem a) or b) or both using CSS layout?
Thanks for any reply!