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 formField
Sling Model used for form field component.- Since:
- com.adobe.cq.forms.core.components.models.form 0.0.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.adobe.cq.forms.core.components.models.form.Base
Base.ConstraintType, Base.FieldType
-
Nested classes/interfaces inherited from interface com.adobe.cq.forms.core.components.models.form.BaseConstraint
BaseConstraint.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
getDataFormat()
The format in which the value will be exported or submitted.java.lang.Object
getDefault()
The value of the field when no value is provided by the end user or data model.default java.lang.String
getDisplayFormat()
The format in which the value will be displayed to the user on screen in the field.default java.lang.String
getEditFormat()
The format in which the value will be edited by the user.default java.lang.String
getPlaceHolder()
The placeholder to show on the field.default @Nullable java.lang.String
getShortDescription()
Returns the short description of the fielddefault boolean
isReadOnly()
Checks if the field should be rendered read only.default boolean
isShortDescriptionVisible()
Returnstrue
if short description should always be visible, otherwisefalse
.-
Methods inherited from interface com.adobe.cq.forms.core.components.models.form.Base
getConstraintsMessages, getDataRef, getDescription, getExportedType, getFieldType, getLabel, getName, getProperties, getScreenReaderText, isEnabled, isVisible
-
Methods inherited from interface com.adobe.cq.forms.core.components.models.form.BaseConstraint
getFormat, getType, getValidationExpression, isRequired
-
-
-
-
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()
Returnstrue
if short description should always be visible, otherwisefalse
.- Returns:
true
if short description should always be visible, otherwisefalse
- Since:
- com.adobe.cq.forms.core.components.models.form 1.0.0
-
-