I am trying to build an app with vaadin which is as far as possible layoutable via CSS. My problem is that Vaadin oftenly sets an explicit size to my components.
In particular I am creating a wrapped form field which has an enable/disable CheckBox grouped with it. Therefore I am using a custom component with a CSS layout.
Unfortunatly I fail to prevent the CustomComponent from being sized explicitly. No matter what I do (setSizeUndefined, setWidth(null) or anything) the CustomComponent always gets a fixed width and height. That collides with my CSS based layout.
That is a nasty feature in CustomComponent’s client side implementation. I have faced it myself too and I hate it. It is just a bad workaround to fix some trivial IE6 bug.
A quick workaround: ditch that CustomComponent and extend CssLayout instead.
Feel free to add ticket about this nasty “feature”. Otherwise fixing it will never end up on our endless task list.
thanks for your input. Maybe I’ll file a bug report. More important than to fix this, is in my opinion do sorowly document which components work without an explicit size and which won’t. Especially if one wants to make heavy use of CSS based layouts such as CssLayout or CustomLayout (which I now chose as a solution) it is very important to select only those components which do not explilcitly size their contents.