Automatic size paradox detection?

Hello everyone,

I’ve been trying for a really long time now to fix a “bug” in my Vaadin UI where it refused to show any scroll bars. In the end, the culprit turned out to be a
size paradox
(component with size “full” inside a container of size “undefined”) somewhere in my hierarchy.

Now, for small hierarchies, that might not be a problem as it’s easy to check. But if you reach nesting levels of about 10 or deeper, this stuff becomes really hard to detect. I’ve written a static utility method now to debug such cases.

The question is
: does Vaadin print a warning somewhere if it detects such a case at runtime, e.g. when performing the actual layouting? And if it does not: why not? A warning could be logged to the Java console, or to the JavaScript browser console, just knowing that some layouting is wrong would be tremendously helpful and would have saved me lots of frustrating hours of work. Maybe something like this exists and needs to be enabled somewhere, that’s why I ask.

Kind regards,


Using the Debug window (calling the application with ?debug when not in productionmode) you can do “Analyze Layout”. This will check the layout essentially notifiying you of such layout issues like the one you described.

Oh my god… I was aware of the debug mode and I used it on several occasions, but I missed the “analyze layout” button so far. This would have been very helpful.

Thanks a lot, this is an excellent piece of info for me :slight_smile: