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
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.sling.api.resource.ResourceIf your component needs child nodes then override this method, call the superclass implementation, and then use addChildren to add additional nodes to it.getIcon()String[]voidinit()booleanbooleanbooleanvoidsetDatasource(String datasource) voidsetDisabled(boolean disabled) voidsetDisplayProperty(String displayProperty) voidsetForceSelection(boolean forceSelection) voidvoidsetMultiple(boolean multiple) voidsetOptions(String options) voidsetOptionsQuery(String optionsQuery) voidsetPredicates(String[] predicates) voidMethods inherited from class com.adobe.acs.commons.mcp.form.FieldComponent
addClientLibraries, addClientLibraries, addClientLibraries, addClientLibrary, getAccessibleObject, getBooleanOption, getCategory, getClientLibraryCategories, getFieldDefinition, getHelper, getHtml, getName, getOption, getOptionNames, getPath, getProperties, getResourceSuperType, getResourceType, hasOption, purgeEmptyProperties, setCategory, setHelper, setPath, setResourceSuperType, setResourceType, setup
-
Constructor Details
-
AutocompleteComponent
public AutocompleteComponent()
-
-
Method Details
-
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
- Returns:
- the icon
-
setIcon
- Parameters:
icon- the icon to set
-
getDatasource
- Returns:
- the datasource
-
setDatasource
- Parameters:
datasource- the datasource to set
-
getValues
- Returns:
- the values
-
setValues
- Parameters:
values- the values to set
-
getOptions
- Returns:
- the options
-
setOptions
- Parameters:
options- the options to set
-
getOptionsQuery
- Returns:
- the optionsQuery
-
setOptionsQuery
- Parameters:
optionsQuery- the optionsQuery to set
-
getDisplayProperty
- Returns:
- the displayProperty
-
setDisplayProperty
- Parameters:
displayProperty- the displayProperty to set
-
getPredicates
- Returns:
- the predicates
-
setPredicates
- Parameters:
predicates- the predicate to set
-