Interface Text
-
- All Superinterfaces:
ComponentExporter
,Field
@ConsumerType public interface Text extends Field
Defines the formText
Sling Model used for the/apps/core/wcm/components/form/text
component.- 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.String
getConstraintMessage()
Returns the message to be displayed when the constraint specified bygetType()
is not fulfilled.default java.lang.String
getPlaceholder()
Returns the value of theplaceholder
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 atextarea
.default java.lang.String
getType()
Returns the type of the input field such astext
,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.-
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:
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 theplaceholder
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 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
default
in 14.1.0
-
getType
default java.lang.String getType()
Returns the type of the input field such astext
,textarea
,date
,email
etc. The types other thantextarea
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 atextarea
.- 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
-
-