Enum Class HtmlControlType

java.lang.Object
java.lang.Enum<HtmlControlType>
org.apache.struts2.components.HtmlControlType
All Implemented Interfaces:
Serializable, Comparable<HtmlControlType>, Constable

public enum HtmlControlType extends Enum<HtmlControlType>
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
  • Enum Constant Details

  • Method Details

    • values

      public static HtmlControlType[] 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

      public static HtmlControlType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • from

      public static HtmlControlType from(String type)
      Resolves a raw type attribute value. Never throws: the attribute is OGNL-evaluated, so at runtime it can be any string. Anything unrecognised becomes UNSUPPORTED, 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()