Interface Text

  • 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

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.String getConstraintMessage()
      Returns the message to be displayed when the constraint specified by getType() is not fulfilled.
      default java.lang.String getPlaceholder()
      Returns the value of the placeholder HTML attribute.
      default java.lang.String getRequiredMessage()
      Returns the message to be displayed if the field is mandatory.
      default int getRows()
      Returns the number of rows to display in case this item's type is a textarea.
      default java.lang.String getType()
      Returns the type of the input field such as text, textarea, date, email etc.
      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.
      default boolean isReadOnly()
      Checks if the field should be rendered read only.
      default boolean isRequired()
      Checks if the this text field is mandatory.
    • Method Detail

      • 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 java.lang.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:
        isRequired()
      • getPlaceholder

        default java.lang.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 java.lang.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 java.lang.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