public enum FieldValidationStatus extends Enum<FieldValidationStatus>
An enumeration class describing the possible validation status values of a form field.
While a user edits a form, validation can be performed concurrently. So the user gets immediate feedback, which fields are valid and which are not. The status of a field as related to validation is defined using this enumeration. Possible states a field can be in are the following:
The validation status is typically evaluated by objects that observe
validation operations. Such objects can register at a FormController
as FormControllerValidationListener
. They are then notified whenever
a validation takes place which may impact the validation status of a field.
In reaction on such a change the UI may be updated, e.g. fields with invalid
content may be marked in a specific way.
Enum Constant and Description |
---|
INVALID
The field is invalid (and has already been visited).
|
NOT_VISITED_INVALID
The field has not yet been visited and is invalid.
|
NOT_VISITED_VALID
The field has not yet been visited and is valid.
|
NOT_VISITED_WARNING
The field has not yet been visited and contains a warning.
|
VALID
The field is valid (and has already been visited).
|
WARNING
The field is in warning state (and has already been visited).
|
Modifier and Type | Method and Description |
---|---|
static FieldValidationStatus |
getStatus(ValidationResult vres,
boolean visited)
Returns the
FieldValidationStatus instance that corresponds to
the given ValidationResult and visited status. |
static FieldValidationStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldValidationStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldValidationStatus VALID
public static final FieldValidationStatus INVALID
public static final FieldValidationStatus WARNING
public static final FieldValidationStatus NOT_VISITED_VALID
public static final FieldValidationStatus NOT_VISITED_INVALID
public static final FieldValidationStatus NOT_VISITED_WARNING
public static FieldValidationStatus[] values()
for (FieldValidationStatus c : FieldValidationStatus.values()) System.out.println(c);
public static FieldValidationStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static FieldValidationStatus getStatus(ValidationResult vres, boolean visited)
FieldValidationStatus
instance that corresponds to
the given ValidationResult
and visited status.vres
- the ValidationResult
(can be null, then the
result is considered valid)visited
- the visited statusFieldValidationStatus
instanceCopyright © 2016 The JGUIraffe Team. All rights reserved.