All Superinterfaces:
ComponentExporter, Field

@ConsumerType public interface Text extends Field
Defines the form Text Sling Model used for the /apps/core/wcm/components/form/text component.
Since:
com.adobe.cq.wcm.core.components.models.form 13.0.0
  • Field Summary

    Fields inherited from interface com.adobe.cq.wcm.core.components.models.form.Field

    PN_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the message to be displayed when the constraint specified by getType() is not fulfilled.
    default String
    Returns the value of the placeholder HTML attribute.
    default String
    Returns the message to be displayed if the field is mandatory.
    default int
    Returns the number of rows to display in case this item's type is a textarea.
    default String
    Returns the type of the input field such as text, textarea, date, email etc.
    default boolean
    Checks if the title (label of the field) should be visually hidden; this is required if the title is mandatory only for accessibility purposes.
    default boolean
    Checks if the field should be rendered read only.
    default boolean
    Checks if the this text field is mandatory.

    Methods inherited from interface com.adobe.cq.wcm.core.components.models.form.Field

    getExportedType, getHelpMessage, getId, getName, getTitle, getValue
  • Method Details

    • isRequired

      default boolean isRequired()
      Checks if the this text field is mandatory.
      Returns:
      true if the field must have a input, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • getRequiredMessage

      default String getRequiredMessage()
      Returns the message to be displayed if the field is mandatory.
      Returns:
      the message to be displayed if the field is mandatory but has not been filled by the user
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
      See Also:
    • getPlaceholder

      default String getPlaceholder()
      Returns the value of the placeholder HTML attribute.
      Returns:
      the value of placeholder attribute
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • isReadOnly

      default boolean isReadOnly()
      Checks if the field should be rendered read only.
      Returns:
      true if the field should be read-only, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • getConstraintMessage

      default String getConstraintMessage()
      Returns the message to be displayed when the constraint specified by getType() is not fulfilled.
      Returns:
      the message to be displayed when the constraint specified by getType() is not fulfilled
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • getType

      default String getType()
      Returns the type of the input field such as text, textarea, date, email etc. The types other than textarea are defined by the HTML5 standard.
      Returns:
      the type of the field
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • getRows

      default int getRows()
      Returns the number of rows to display in case this item's type is a textarea.
      Returns:
      the number of rows the textarea should display
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0
    • hideTitle

      default boolean hideTitle()
      Checks if the title (label of the field) should be visually hidden; this is required if the title is mandatory only for accessibility purposes.
      Returns:
      true if the title should remain hidden, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.models.form 13.0.0; marked default in 14.1.0