Package org.apache.struts2.components
Enum Class HtmlControlType
- All Implemented Interfaces:
Serializable,Comparable<HtmlControlType>,Constable
The kind of HTML form control a
UIBean renders, used to decide which HTML5 constraint
attributes are legal on it.
This models the control rather than the type attribute, because textarea
and select have no type attribute yet still accept required.
- Since:
- 7.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA control no constraint applies to and nodata-msg-*message is rendered for: atypethe framework does not recognise, or a component with nogetControlType()override (<s:label>,<s:submit>and the like). -
Method Summary
Modifier and TypeMethodDescriptionstatic HtmlControlTypeResolves a rawtypeattribute value.booleanbooleanbooleanstatic HtmlControlTypeReturns the enum constant of this class with the specified name.static HtmlControlType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TEXT
-
SEARCH
-
TEL
-
PASSWORD
-
EMAIL
-
URL
-
NUMBER
-
RANGE
-
DATE
-
MONTH
-
WEEK
-
TIME
-
DATETIME_LOCAL
-
CHECKBOX
-
RADIO
-
FILE
-
HIDDEN
-
SELECT
-
TEXTAREA
-
UNSUPPORTED
A control no constraint applies to and nodata-msg-*message is rendered for: atypethe framework does not recognise, or a component with nogetControlType()override (<s:label>,<s:submit>and the like).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
from
Resolves a rawtypeattribute value. Never throws: the attribute is OGNL-evaluated, so at runtime it can be any string. Anything unrecognised becomesUNSUPPORTED, which supports no constraints at all — so an unknown control degrades to emitting nothing. -
supportsPattern
public boolean supportsPattern() -
supportsLength
public boolean supportsLength() -
supportsRange
public boolean supportsRange()
-