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/Button.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/Button.java')
-rw-r--r-- | server/src/com/vaadin/ui/Button.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java index 9b50b5eebc..7063568f26 100644 --- a/server/src/com/vaadin/ui/Button.java +++ b/server/src/com/vaadin/ui/Button.java @@ -727,7 +727,7 @@ public class Button extends AbstractComponent implements public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); Attributes attr = design.attributes(); - Button def = designContext.getDefaultInstance(this.getClass()); + Button def = (Button) designContext.getDefaultInstance(this); String content = getCaption(); if (content != null) { design.html(content); |