Package com.adobe.aemds.guide.common
Class GuideField
- java.lang.Object
-
- com.adobe.cq.sightly.WCMUsePojo
-
- com.adobe.aemds.guide.common.GuideNode
-
- com.adobe.aemds.guide.common.GuideField
-
- All Implemented Interfaces:
FDField
,StyledFDField
,java.io.Serializable
,Use
- Direct Known Subclasses:
GuideButton
,GuideCaptcha
,GuideChart
,GuideCheckBox
,GuideDatePicker
,GuideDropDownList
,GuideFileUpload
,GuideImage
,GuideNumericBox
,GuidePasswordBox
,GuideScribble
,GuideSeparator
,GuideSwitch
,GuideTermsAndConditions
,GuideTextBox
,GuideTextDraw
public abstract class GuideField extends GuideNode
GuideField is a base class from which every AEM form field component inherits from. It abstracts the basic properties of a field. Few are:- Hiding the title of the field
- Short Description of the field
- Long description
This provides basic getter's and setter's required to create/initialize an AEM Form Field Component.
- Since:
- AEM 6.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GuideField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getAuthoringConfig()
Gives the authoring configuration of the guide field componentjava.lang.Boolean
getAutocomplete()
Returns the value of autocompletejava.lang.String
getAutofillFieldKeyword()
Returns the value of autofill field keywordjava.lang.String
getCaptionInlineStyles()
Returns the string containing the inline style specified for the captionjava.lang.Boolean
getDescriptionVisibility()
Returns the visibility of the short description as specified in the Authoring Dialogjava.lang.String
getErrorSimulatorString()
Returns the error simulation string to be shown in Authoring for styling purposesjava.lang.String
getFieldLayout()
Returns the field layout configured during authoring.java.lang.String
getFieldLayoutName()
Returns the name of the field layoutjava.lang.String
getHelpIndicatorContent()
Returns the help content for fieldboolean
getHideTitle()
Returns if the current field's title is hidden or notboolean
getIsOldFieldLayout()
java.lang.Boolean
getIsReadOnly()
java.lang.Boolean
getIsRequired()
java.lang.String
getLabelForId()
Returns id for field label association, for accessibilityjava.lang.String
getLongDescription()
Returns the long description of the field configured in authoring dialogjava.lang.String
getPlaceholderText()
Returns the placeholder text set in the authoring dialogjava.lang.String
getShortDescription()
Returns the short description of the field configured in the authoring dialogjava.lang.String
getShortDescriptionInlineStyles()
Returns the string containing the inline style specified for the short descriptionjava.lang.String
getValue()
Returns the initial value of the field set in the authoring dialogjava.lang.String
getWidgetInlineStyles()
Returns the string containing the inline style specified for the widgetboolean
isMandatory()
Return if the field is marked as required.void
setHelpIndicatorContent(java.lang.String helpQuestionMarkContent)
Sets the help indicator content for the field.-
Methods inherited from class com.adobe.aemds.guide.common.GuideNode
activate, checkIfPathIsAbsolute, externalize, getAddMessage, getAppearance, getAuthoringConfigJSON, getBindRef, getClientLibRef, getColspan, getCssClassName, getDescription, getEnabled, getEnabledExp, getError, getFieldInlineStyles, getGuideFieldType, getHeight, getI18n, getId, getInlineCssClass, getInlineStyles, getIsEditMode, getIsRepeatable, getItems, getLayoutPath, getLayoutTabType, getLongDescriptionInlineStyles, getName, getNavTitle, getNodeClass, getNonNavigableProperty, getPath, getQuestionMarkInlineStyles, getRemoveMessage, getResourceSuperType, getResourceType, getResponsiveClasses, getSlingRequest, getStyles, getTargetVersion, getTitle, getToolbarPosition, getVersion, getVisible, getVisibleExp, getWidth, getXssapi, getXssDescription, isDocumentFragmentGroup, isLayoutNavigable, isMenuRequired, isValid, isValidDorTemplateRef, setClientLibRef, setResource, setSlingRequest, syncNode, validate
-
Methods inherited from class com.adobe.cq.sightly.WCMUsePojo
get, getComponent, getComponentContext, getCurrentDesign, getCurrentPage, getCurrentStyle, getDesigner, getEditContext, getInheritedProperties, getPageManager, getPageProperties, getProperties, getRequest, getResource, getResourceDesign, getResourcePage, getResourceResolver, getResponse, getSlingScriptHelper, getWcmMode, getXSSAPI, init
-
-
-
-
Method Detail
-
getIsRequired
public java.lang.Boolean getIsRequired()
-
getIsReadOnly
public java.lang.Boolean getIsReadOnly()
-
getLabelForId
public java.lang.String getLabelForId() throws javax.jcr.RepositoryException
Returns id for field label association, for accessibility- Returns:
- String Id for field label association
- Throws:
javax.jcr.RepositoryException
-
getAutofillFieldKeyword
public java.lang.String getAutofillFieldKeyword()
Returns the value of autofill field keyword- Returns:
- String representing autofill field keyword value
-
getAutocomplete
public java.lang.Boolean getAutocomplete()
Returns the value of autocomplete- Returns:
- Boolean representing autocomplete value
-
getIsOldFieldLayout
public boolean getIsOldFieldLayout()
-
getFieldLayout
public java.lang.String getFieldLayout()
Returns the field layout configured during authoring. If field layout is specified at field level, it takes priority, else field layout configured in adaptive form container is honored.- Returns:
- path of the field layout
-
getFieldLayoutName
public java.lang.String getFieldLayoutName()
Returns the name of the field layout- Returns:
- name of the field layout configured
-
getHideTitle
public boolean getHideTitle()
Returns if the current field's title is hidden or not- Returns:
- boolean indicating if title is hidden or not
-
getShortDescription
public java.lang.String getShortDescription()
Returns the short description of the field configured in the authoring dialog- Returns:
- string representing the short description of the field
-
getLongDescription
public java.lang.String getLongDescription()
Returns the long description of the field configured in authoring dialog- Returns:
- String representing the long description
-
getDescriptionVisibility
public java.lang.Boolean getDescriptionVisibility()
Returns the visibility of the short description as specified in the Authoring Dialog- Returns:
- true if "Always show short Description" is selected otherwise false
-
getValue
public java.lang.String getValue()
Returns the initial value of the field set in the authoring dialog- Returns:
- String representing the default value
-
getCaptionInlineStyles
public java.lang.String getCaptionInlineStyles()
Returns the string containing the inline style specified for the caption- Returns:
- inline style of the caption
-
getWidgetInlineStyles
public java.lang.String getWidgetInlineStyles()
Returns the string containing the inline style specified for the widget- Returns:
- inline style of the widget
-
setHelpIndicatorContent
public void setHelpIndicatorContent(java.lang.String helpQuestionMarkContent)
Sets the help indicator content for the field. By default the indicator is represented as a "?", but can be changed through this API.- Parameters:
helpQuestionMarkContent
- string representing the help question mark content
-
getHelpIndicatorContent
public java.lang.String getHelpIndicatorContent()
Returns the help content for field- Returns:
- question mark content of the help
-
getShortDescriptionInlineStyles
public java.lang.String getShortDescriptionInlineStyles()
Returns the string containing the inline style specified for the short description- Returns:
- inline style of the short description
-
getPlaceholderText
public java.lang.String getPlaceholderText()
Returns the placeholder text set in the authoring dialog- Returns:
- place holder text set for the field
-
getErrorSimulatorString
public java.lang.String getErrorSimulatorString()
Returns the error simulation string to be shown in Authoring for styling purposes- Returns:
- error simulation string for a given field
-
isMandatory
public boolean isMandatory()
Return if the field is marked as required.- Returns:
- true if field is configured as mandatory, false otherwise
-
getAuthoringConfig
public java.util.Map<java.lang.String,java.lang.Object> getAuthoringConfig()
Gives the authoring configuration of the guide field component- Overrides:
getAuthoringConfig
in classGuideNode
- Returns:
- authoring config of guide field component
-
-