Interface Text
-
- All Superinterfaces:
ComponentExporter,Field
@ConsumerType public interface Text extends Field
Defines the formTextSling Model used for the/apps/core/wcm/components/form/textcomponent.- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.lang.StringgetConstraintMessage()Returns the message to be displayed when the constraint specified bygetType()is not fulfilled.default java.lang.StringgetPlaceholder()Returns the value of theplaceholderHTML attribute.default java.lang.StringgetRequiredMessage()Returns the message to be displayed if the field is mandatory.default intgetRows()Returns the number of rows to display in case this item's type is atextarea.default java.lang.StringgetType()Returns the type of the input field such astext,textarea,date,emailetc.default booleanhideTitle()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 booleanisReadOnly()Checks if the field should be rendered read only.default booleanisRequired()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 Detail
-
isRequired
default boolean isRequired()
Checks if the this text field is mandatory.- Returns:
trueif the field must have a input,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 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
defaultin 14.1.0 - See Also:
isRequired()
-
getPlaceholder
default java.lang.String getPlaceholder()
Returns the value of theplaceholderHTML attribute.- Returns:
- the value of placeholder attribute
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
isReadOnly
default boolean isReadOnly()
Checks if the field should be rendered read only.- Returns:
trueif the field should be read-only,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getConstraintMessage
default java.lang.String getConstraintMessage()
Returns the message to be displayed when the constraint specified bygetType()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
defaultin 14.1.0
-
getType
default java.lang.String getType()
Returns the type of the input field such astext,textarea,date,emailetc. The types other thantextareaare defined by the HTML5 standard.- Returns:
- the type of the field
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getRows
default int getRows()
Returns the number of rows to display in case this item's type is atextarea.- Returns:
- the number of rows the
textareashould display - Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 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:
trueif the title should remain hidden,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
-