From: Leif Åstrand Date: Wed, 16 Nov 2011 11:55:14 +0000 (+0200) Subject: Initialize content on the fly if not already initialized X-Git-Tag: 7.0.0.alpha1~298 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c71732250c2c5f934479350ccf011f0d385caf6b;p=vaadin-framework.git Initialize content on the fly if not already initialized --- diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java index 0b18d604d1..7819ccfa95 100644 --- a/src/com/vaadin/ui/Root.java +++ b/src/com/vaadin/ui/Root.java @@ -495,6 +495,9 @@ public class Root extends AbstractComponentContainer { } public ComponentContainer getContent() { + if (content == null) { + setContent(new VerticalLayout()); + } return content; }