summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorMika Murtojarvi <mika@vaadin.com>2014-12-09 13:34:33 +0200
committerMika Murtojarvi <mika@vaadin.com>2014-12-09 15:59:48 +0200
commit12e5d620ab2ce885590a280d2c19e230cc083bb6 (patch)
tree2dcfa896ed22383952fe07aee821aeb72aa06a5e /server/src/com/vaadin/ui/AbstractComponent.java
parent18b333ee3dfd171956829e97a32baa8069346c65 (diff)
downloadvaadin-framework-12e5d620ab2ce885590a280d2c19e230cc083bb6.tar.gz
vaadin-framework-12e5d620ab2ce885590a280d2c19e230cc083bb6.zip
Handle immediate property as a special case (#7749).
Change-Id: I507b44acfd3036d2d2862d1d04b518adc7bf826a
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r--server/src/com/vaadin/ui/AbstractComponent.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java
index 8349dcfa25..11e24a306e 100644
--- a/server/src/com/vaadin/ui/AbstractComponent.java
+++ b/server/src/com/vaadin/ui/AbstractComponent.java
@@ -930,6 +930,14 @@ public abstract class AbstractComponent extends AbstractClientConnector
for (String attribute : getDefaultAttributes()) {
DesignAttributeHandler.readAttribute(this, attribute, attr, def);
}
+ // handle immediate
+ if (attr.hasKey("immediate")) {
+ String str = attr.get("immediate");
+ boolean immediate = "".equals(str) ? true : Boolean.valueOf(str);
+ setImmediate(immediate);
+ } else {
+ explicitImmediateValue = null;
+ }
// handle width and height
readSize(attr, def);
// handle component error
@@ -1162,7 +1170,8 @@ public abstract class AbstractComponent extends AbstractClientConnector
private static final String[] customAttributes = new String[] { "width",
"height", "debug-id", "error", "width-auto", "height-auto",
- "width-full", "height-full", "size-auto", "size-full", "responsive" };
+ "width-full", "height-full", "size-auto", "size-full",
+ "responsive", "immediate" };
/*
* (non-Javadoc)
@@ -1182,6 +1191,10 @@ public abstract class AbstractComponent extends AbstractClientConnector
for (String attribute : getDefaultAttributes()) {
DesignAttributeHandler.writeAttribute(this, attribute, attr, def);
}
+ // handle immediate
+ if (explicitImmediateValue != null) {
+ design.attr("immediate", explicitImmediateValue.toString());
+ }
// handle size
writeSize(attr, def);
// handle component error