diff options
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractOrderedLayout.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractOrderedLayout.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index cd5609f091..b105d53fce 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -533,13 +533,17 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements // synchronize default attributes super.writeDesign(design, designContext); // handle margin - AbstractOrderedLayout def = designContext.getDefaultInstance(this - .getClass()); + AbstractOrderedLayout def = (AbstractOrderedLayout) designContext + .getDefaultInstance(this); if (getMargin().getBitMask() != def.getMargin().getBitMask()) { design.attr("margin", ""); } // handle children Element designElement = design; + if (!designContext.shouldWriteChildren(this, def)) { + return; + } + for (Component child : this) { Element childNode = designContext.createNode(child); designElement.appendChild(childNode); |