Interface Field

  • All Superinterfaces:
    Base, BaseConstraint, com.adobe.cq.wcm.core.components.models.Component, com.adobe.cq.export.json.ComponentExporter
    All Known Subinterfaces:
    TextInput

    @ConsumerType
    public interface Field
    extends Base, BaseConstraint
    Defines the form Field Sling Model used for form field component.
    Since:
    com.adobe.cq.forms.core.components.models.form 0.0.1
    • Method Detail

      • 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.forms.core.components.models.form 0.0.1
      • getPlaceHolder

        default java.lang.String getPlaceHolder()
        The placeholder to show on the field.
        Returns:
        placeholder to show on the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getDisplayFormat

        default java.lang.String getDisplayFormat()
        The format in which the value will be displayed to the user on screen in the field. For example when using a currency field, the currency sign should be shown to the user.
        Returns:
        display format of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getEditFormat

        default java.lang.String getEditFormat()
        The format in which the value will be edited by the user. For instance users in Germany would want to interchange decimal (.) and comma (,) when entering numerical values.
        Returns:
        edit format of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getDataFormat

        default java.lang.String getDataFormat()
        The format in which the value will be exported or submitted.
        Returns:
        data format of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getDefault

        java.lang.Object getDefault()
        The value of the field when no value is provided by the end user or data model. The type of this property should match the value of the type property defined in the Field. If not, then a type coercion will be tried and if that fails, the value will be set to null.
        Returns:
        default value of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 0.0.1
      • getShortDescription

        @Nullable
        default @Nullable java.lang.String getShortDescription()
        Returns the short description of the field
        Returns:
        the short description of the field
        Since:
        com.adobe.cq.forms.core.components.models.form 1.0.0
      • isShortDescriptionVisible

        default boolean isShortDescriptionVisible()
        Returns true if short description should always be visible, otherwise false.
        Returns:
        true if short description should always be visible, otherwise false
        Since:
        com.adobe.cq.forms.core.components.models.form 1.0.0