From d63bf2c215831dcfea060331339199cc086d78f7 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 1 May 2015 19:44:40 +0300 Subject: Make fields with validators immediate (#13709) Change-Id: I113aa38869cf4dceec24315e70d3b44eae526f65 --- server/src/com/vaadin/ui/AbstractComponent.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server/src/com/vaadin/ui/AbstractComponent.java') diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index fd8a72ee23..27d97d5e03 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -405,6 +405,26 @@ public abstract class AbstractComponent extends AbstractClientConnector } } + /** + * Returns the explicitly set immediate value. + * + * @return the explicitly set immediate value or null if + * {@link #setImmediate(boolean)} has not been explicitly invoked + */ + protected Boolean getExplicitImmediateValue() { + return explicitImmediateValue; + } + + /** + * Returns the immediate mode of the component. + *

+ * Certain operations such as adding a value change listener will set the + * component into immediate mode if {@link #setImmediate(boolean)} has not + * been explicitly called with false. + * + * @return true if the component is in immediate mode (explicitly or + * implicitly set), false if the component if not in immediate mode + */ public boolean isImmediate() { if (explicitImmediateValue != null) { return explicitImmediateValue; -- cgit v1.2.3