summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/TextField.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2014-12-18 18:30:09 +0200
committerLeif Åstrand <leif@vaadin.com>2014-12-18 18:30:09 +0200
commite3d0fbbab68f9ef8642a975741d9f576993b1f38 (patch)
tree5711a31c5af1d3773a86b4d25c9f8064aa435ecc /server/src/com/vaadin/ui/TextField.java
parent434fb5bf5cf62490686367e9193b7898077bbd44 (diff)
parent68eec666b55c42b4a55235c00bc78f6212eb2062 (diff)
downloadvaadin-framework-e3d0fbbab68f9ef8642a975741d9f576993b1f38.tar.gz
vaadin-framework-e3d0fbbab68f9ef8642a975741d9f576993b1f38.zip
Merge remote-tracking branch 'origin/master' into grid
Change-Id: Ic7629f9cedb3c948edf4f63c678ca499e3d52805
Diffstat (limited to 'server/src/com/vaadin/ui/TextField.java')
-rw-r--r--server/src/com/vaadin/ui/TextField.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/TextField.java b/server/src/com/vaadin/ui/TextField.java
index 1fc10c6ced..2a61e93211 100644
--- a/server/src/com/vaadin/ui/TextField.java
+++ b/server/src/com/vaadin/ui/TextField.java
@@ -16,7 +16,12 @@
package com.vaadin.ui;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Element;
+
import com.vaadin.data.Property;
+import com.vaadin.ui.declarative.DesignAttributeHandler;
+import com.vaadin.ui.declarative.DesignContext;
/**
* <p>
@@ -102,6 +107,38 @@ public class TextField extends AbstractTextField {
/*
* (non-Javadoc)
*
+ * @see com.vaadin.ui.AbstractTextField#readDesign(org.jsoup.nodes.Element,
+ * com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void readDesign(Element design, DesignContext designContext) {
+ super.readDesign(design, designContext);
+ Attributes attr = design.attributes();
+ if (attr.hasKey("value")) {
+ setValue(DesignAttributeHandler.readAttribute("value", attr,
+ String.class));
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.vaadin.ui.AbstractTextField#writeDesign(org.jsoup.nodes.Element
+ * , com.vaadin.ui.declarative.DesignContext)
+ */
+ @Override
+ public void writeDesign(Element design, DesignContext designContext) {
+ super.writeDesign(design, designContext);
+ AbstractTextField def = (AbstractTextField) designContext
+ .getDefaultInstance(this);
+ Attributes attr = design.attributes();
+ DesignAttributeHandler.writeAttribute("value", attr, getValue(),
+ def.getValue(), String.class);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see com.vaadin.ui.AbstractField#clear()
*/
@Override