Package com.adobe.acs.commons.mcp.form
Class AutocompleteComponent
- java.lang.Object
-
- com.adobe.acs.commons.mcp.form.FieldComponent
-
- com.adobe.acs.commons.mcp.form.AutocompleteComponent
-
public class AutocompleteComponent extends FieldComponent
Implements the Granite UI Autocomplete component. Docs here: https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/form/autocomplete/index.html If displayProperty and predicates are set (e.g. via options) then the ACS query autocomplete will be used: https://adobe-consulting-services.github.io/acs-aem-commons/features/ui-widgets/query-autocomplete-datasource/index.html Note: You still have to first enable this extension manually to use it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adobe.acs.commons.mcp.form.FieldComponent
FieldComponent.ClientLibraryType
-
-
Constructor Summary
Constructors Constructor Description AutocompleteComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.sling.api.resource.ResourcebuildComponentResource()If your component needs child nodes then override this method, call the superclass implementation, and then use addChildren to add additional nodes to it.StringgetDatasource()StringgetDisplayProperty()StringgetIcon()StringgetOptions()StringgetOptionsQuery()String[]getPredicates()StringgetValues()voidinit()booleanisDisabled()booleanisForceSelection()booleanisMultiple()voidsetDatasource(String datasource)voidsetDisabled(boolean disabled)voidsetDisplayProperty(String displayProperty)voidsetForceSelection(boolean forceSelection)voidsetIcon(String icon)voidsetMultiple(boolean multiple)voidsetOptions(String options)voidsetOptionsQuery(String optionsQuery)voidsetPredicates(String[] predicates)voidsetValues(String values)-
Methods inherited from class com.adobe.acs.commons.mcp.form.FieldComponent
addClientLibraries, addClientLibraries, addClientLibraries, addClientLibrary, getAccessibleObject, getBooleanOption, getCategory, getClientLibraryCategories, getComponentMetadata, getField, getFieldDefinition, getHelper, getHtml, getName, getOption, getOptionNames, getPath, getResourceSuperType, getResourceType, hasOption, purgeEmptyMetadata, setCategory, setHelper, setPath, setResourceSuperType, setResourceType, setup
-
-
-
-
Method Detail
-
init
public void init()
- Specified by:
initin classFieldComponent
-
buildComponentResource
public org.apache.sling.api.resource.Resource buildComponentResource()
Description copied from class:FieldComponentIf your component needs child nodes then override this method, call the superclass implementation, and then use addChildren to add additional nodes to it.- Overrides:
buildComponentResourcein classFieldComponent- Returns:
-
isDisabled
public boolean isDisabled()
- Returns:
- the disabled
-
setDisabled
public void setDisabled(boolean disabled)
- Parameters:
disabled- the disabled to set
-
isMultiple
public boolean isMultiple()
- Returns:
- the multiple
-
setMultiple
public void setMultiple(boolean multiple)
- Parameters:
multiple- the multiple to set
-
isForceSelection
public boolean isForceSelection()
- Returns:
- the forceSelection
-
setForceSelection
public void setForceSelection(boolean forceSelection)
- Parameters:
forceSelection- the forceSelection to set
-
getIcon
public String getIcon()
- Returns:
- the icon
-
setIcon
public void setIcon(String icon)
- Parameters:
icon- the icon to set
-
getDatasource
public String getDatasource()
- Returns:
- the datasource
-
setDatasource
public void setDatasource(String datasource)
- Parameters:
datasource- the datasource to set
-
getValues
public String getValues()
- Returns:
- the values
-
setValues
public void setValues(String values)
- Parameters:
values- the values to set
-
getOptions
public String getOptions()
- Returns:
- the options
-
setOptions
public void setOptions(String options)
- Parameters:
options- the options to set
-
getOptionsQuery
public String getOptionsQuery()
- Returns:
- the optionsQuery
-
setOptionsQuery
public void setOptionsQuery(String optionsQuery)
- Parameters:
optionsQuery- the optionsQuery to set
-
getDisplayProperty
public String getDisplayProperty()
- Returns:
- the displayProperty
-
setDisplayProperty
public void setDisplayProperty(String displayProperty)
- Parameters:
displayProperty- the displayProperty to set
-
getPredicates
public String[] getPredicates()
- Returns:
- the predicates
-
setPredicates
public void setPredicates(String[] predicates)
- Parameters:
predicates- the predicate to set
-
-