diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-15 08:41:45 +0200 |
---|---|---|
committer | Matti Hosio <mhosio@vaadin.com> | 2014-12-15 16:35:54 +0200 |
commit | 8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb (patch) | |
tree | 93bf9f429390e5643a55f503076a391469359ce2 /server/src/com/vaadin/ui/TextField.java | |
parent | 3b75f2b14833f78c00d0032cbd76b09fca058100 (diff) | |
download | vaadin-framework-8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb.tar.gz vaadin-framework-8eafe7aee31b3e2f80c87b39c4e42e260a86a5eb.zip |
Do not create default instances while reading designs (#7749)
Change-Id: I26cb6d8d43200d10ebf8c0ac22c538b4272f5ecd
Diffstat (limited to 'server/src/com/vaadin/ui/TextField.java')
-rw-r--r-- | server/src/com/vaadin/ui/TextField.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/TextField.java b/server/src/com/vaadin/ui/TextField.java index 03bbfd2d8f..cd919ded9c 100644 --- a/server/src/com/vaadin/ui/TextField.java +++ b/server/src/com/vaadin/ui/TextField.java @@ -113,12 +113,11 @@ public class TextField extends AbstractTextField { @Override public void readDesign(Element design, DesignContext designContext) { super.readDesign(design, designContext); - AbstractTextField def = designContext.getDefaultInstance(this - .getClass()); Attributes attr = design.attributes(); - String value = DesignAttributeHandler.readAttribute("value", attr, - def.getValue(), String.class); - setValue(value); + if (attr.hasKey("value")) { + setValue(DesignAttributeHandler.readAttribute("value", attr, + String.class)); + } } /* |