summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-15 23:02:22 +0200
committerArtur Signell <artur@vaadin.com>2014-12-15 23:04:41 +0200
commit353206974a542d0aadc278dea4adeff226fb3a9e (patch)
treebd6511b2d62cefaaa88f5131abf69f11a1cd12e5 /server/src/com/vaadin/ui/AbstractComponent.java
parent8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb (diff)
downloadvaadin-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/AbstractComponent.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 0b9f8bd244..83833b75ce 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -1206,8 +1206,7 @@ public abstract class AbstractComponent extends AbstractClientConnector
public void writeDesign(Element design, DesignContext designContext) {
// clear element contents
DesignAttributeHandler.clearElement(design);
- AbstractComponent def = designContext.getDefaultInstance(this
- .getClass());
+ AbstractComponent def = designContext.getDefaultInstance(this);
Attributes attr = design.attributes();
// handle default attributes
for (String attribute : getDefaultAttributes()) {