Package de.xima.fc.form.common
Enum ERequiredFieldDisplay
- java.lang.Object
-
- java.lang.Enum<ERequiredFieldDisplay>
-
- de.xima.fc.form.common.ERequiredFieldDisplay
-
- All Implemented Interfaces:
Serializable,Comparable<ERequiredFieldDisplay>
public enum ERequiredFieldDisplay extends Enum<ERequiredFieldDisplay>
Controls which form fields are marked in the form to indicate whether a value must be entered. Required fields are marked with a star next to their label, optional fields with a text such as "optional".- Since:
- 8.6.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ERequiredFieldDisplayfromValue(String value)Parses the value as stored in the form properties.StringgetValue()Gets the value as stored in the form properties.booleanisMarkOptional()Whether optional fields should be marked.booleanisMarkRequired()Whether required fields should be marked.static ERequiredFieldDisplayvalueOf(String name)Returns the enum constant of this type with the specified name.static ERequiredFieldDisplay[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ERequiredFieldDisplay NONE
Neither required nor optional fields are marked.
-
REQUIRED
public static final ERequiredFieldDisplay REQUIRED
Only required fields are marked. This is the default and corresponds to the behavior of previous versions.
-
OPTIONAL
public static final ERequiredFieldDisplay OPTIONAL
Only optional fields are marked.
-
BOTH
public static final ERequiredFieldDisplay BOTH
Both required and optional fields are marked.
-
-
Method Detail
-
values
public static ERequiredFieldDisplay[] 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 (ERequiredFieldDisplay c : ERequiredFieldDisplay.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ERequiredFieldDisplay 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
-
getValue
public String getValue()
Gets the value as stored in the form properties.- Returns:
- The value as stored in the form properties, never
null.
-
isMarkRequired
public boolean isMarkRequired()
Whether required fields should be marked.- Returns:
trueif required fields should be marked,falseotherwise.
-
isMarkOptional
public boolean isMarkOptional()
Whether optional fields should be marked.- Returns:
trueif optional fields should be marked,falseotherwise.
-
fromValue
public static ERequiredFieldDisplay fromValue(String value)
Parses the value as stored in the form properties.- Parameters:
value- Value to parse, may benull.- Returns:
- The parsed value, or
REQUIREDif the value isnullor unknown. Nevernull.
-
-