diff options
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)); + } } /* |