diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-15 23:02:22 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-12-15 23:04:41 +0200 |
commit | 353206974a542d0aadc278dea4adeff226fb3a9e (patch) | |
tree | bd6511b2d62cefaaa88f5131abf69f11a1cd12e5 /server/src/com/vaadin/ui/AbstractSplitPanel.java | |
parent | 8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb (diff) | |
download | vaadin-framework-353206974a542d0aadc278dea4adeff226fb3a9e.tar.gz vaadin-framework-353206974a542d0aadc278dea4adeff226fb3a9e.zip |
Fix writing issues (#7749)
* A root component with @DesignRoot must always use its superclass for
default values. Otherwise the written design will be empty as the
design is read in the constructor.
* A component which is not the root must not write its component tree
if the component tree is generated in the constructor. This is a
simplification which should be good enough for most cases (can't add
children in constructor and also using addComponent - in this case
the component added with addComponent will not be written).
* Test cases for nested templates
Change-Id: I3a384d1d8654b9865a3a790ebeb055a300a62135
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractSplitPanel.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractSplitPanel.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index 9c33665c1c..4c85311075 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -627,8 +627,8 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { super.writeDesign(design, designContext); // handle custom attributes (write only if a value is not the // default value) - AbstractSplitPanel def = designContext.getDefaultInstance(this - .getClass()); + AbstractSplitPanel def = (AbstractSplitPanel) designContext + .getDefaultInstance(this); if (getSplitPosition() != def.getSplitPosition() || !def.getSplitPositionUnit().equals(getSplitPositionUnit())) { String splitPositionString = asString(getSplitPosition()) |