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/AbstractTextField.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/AbstractTextField.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractTextField.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java index 79492ecf5e..8bca74936a 100644 --- a/server/src/com/vaadin/ui/AbstractTextField.java +++ b/server/src/com/vaadin/ui/AbstractTextField.java @@ -772,12 +772,11 @@ public abstract class AbstractTextField extends AbstractField<String> implements @Override public void readDesign(Element design, DesignContext designContext) { super.readDesign(design, designContext); - AbstractTextField def = designContext.getDefaultInstance(this - .getClass()); Attributes attr = design.attributes(); - int maxLength = DesignAttributeHandler.readAttribute("maxlength", attr, - def.getMaxLength(), Integer.class); - setMaxLength(maxLength); + if (attr.hasKey("maxlength")) { + setMaxLength(DesignAttributeHandler.readAttribute("maxlength", + attr, Integer.class)); + } } /* |