com.vaadin.shared.ui.
Enum ValueChangeMode
- java.lang.Object
-
- java.lang.Enum<ValueChangeMode>
-
- com.vaadin.shared.ui.ValueChangeMode
-
All Implemented Interfaces:
public enum ValueChangeMode extends Enum<ValueChangeMode>
Different modes for when and how often field value changes are transmitted from the client to the server.
Since:
8.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLUR
Fires a server-side event when the field loses focus.
EAGER
Fires a server-side event every time the client-side value changes.
LAZY
On every user event, schedule a server-side event after a defined interval, cancelling the currently-scheduled event if any.
TIMEOUT
Fires a server-side event at defined intervals as long as the value changes from one event to the next.
-
Method Summary
All Methods Modifier and Type Method Description static ValueChangeMode
valueOf​(String name)
Returns the enum constant of this type with the specified name.
static ValueChangeMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BLUR
public static final ValueChangeMode BLUR
Fires a server-side event when the field loses focus.
-
EAGER
public static final ValueChangeMode EAGER
Fires a server-side event every time the client-side value changes. This gives the least latency but may cause unnecessary traffic.
-
TIMEOUT
public static final ValueChangeMode TIMEOUT
Fires a server-side event at defined intervals as long as the value changes from one event to the next. For instance, you can use this mode to transmit a snapshot of the contents of a text area every second as long as the user keeps typing.
-
LAZY
public static final ValueChangeMode LAZY
On every user event, schedule a server-side event after a defined interval, cancelling the currently-scheduled event if any. This is a good choice if you want to, for instance, wait for a small break in the user's typing before sending the event.
-
-
Method Detail
-
values
public static ValueChangeMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ValueChangeMode c : ValueChangeMode.values()) System.out.println(c);
Returns:
an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValueChangeMode valueOf​(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Parameters:
name
- the name of the enum constant to be returned.Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-