Enum SecureOption
- java.lang.Object
-
- java.lang.Enum<SecureOption>
-
- org.apache.tapestry5.corelib.data.SecureOption
-
- All Implemented Interfaces:
Serializable
,Comparable<SecureOption>
public enum SecureOption extends Enum<SecureOption>
Possible values of the "secure" parameter for components that use aSelectModel
(such asSelect
), to control whether the submitted value must be one of the values in the SelectModel.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS
Always check that the submitted value is found in the SelectModel (and record a validation error if the SelectModel is not provided (null).AUTO
The default: check that the submitted value is found in the SelectModel, unless the SelectModel is not provided (null) at the time of submission.NEVER
Never check that submitted value is found in the SelectModel.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SecureOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static SecureOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALWAYS
public static final SecureOption ALWAYS
Always check that the submitted value is found in the SelectModel (and record a validation error if the SelectModel is not provided (null).
-
NEVER
public static final SecureOption NEVER
Never check that submitted value is found in the SelectModel. It is left to the user of the component to validate the submitted value.
-
AUTO
public static final SecureOption AUTO
The default: check that the submitted value is found in the SelectModel, unless the SelectModel is not provided (null) at the time of submission. Since SelectModels are automatically provided for enums but not custom classes, this is the most useful option in cases where you don't want to persist a custom SelectModel across a form submission or recreate it when the form is submitted).
-
-
Method Detail
-
values
public static SecureOption[] 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 (SecureOption c : SecureOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SecureOption 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
-
-