Package com.adobe.acs.commons.mcp.form
Class FieldComponent
java.lang.Object
com.adobe.acs.commons.mcp.form.FieldComponent
- Direct Known Subclasses:
AbstractContainerComponent,AutocompleteComponent,ButtonComponent,CheckboxComponent,DatePickerComponent,FileUploadComponent,NumberfieldComponent,PasswordComponent,PathfieldComponent,RadioComponent,RichTextEditorComponent,SelectComponent,TagPickerComponent,TextfieldComponent
Describes a component in a manner which supports auto-generated forms
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddClientLibraries(FieldComponent component) final voidaddClientLibraries(FieldComponent.ClientLibraryType type, String... categories) final voidaddClientLibraries(FieldComponent.ClientLibraryType type, Collection<String> categories) final voidaddClientLibrary(String category) org.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.final AccessibleObjectgetBooleanOption(String option) final Stringfinal Map<FieldComponent.ClientLibraryType,Set<String>> final FormFieldfinal org.apache.sling.api.scripting.SlingScriptHelperfinal StringgetHtml()final StringgetName()final Collection<String>final StringgetPath()final Stringfinal Stringfinal booleanabstract voidinit()final voidfinal voidsetCategory(String category) final voidsetHelper(org.apache.sling.api.scripting.SlingScriptHelper helper) final voidfinal voidsetResourceSuperType(String resourceSuperType) final voidsetResourceType(String resourceType) final voidsetup(String name, AccessibleObject fieldOrMethod, FormField field, org.apache.sling.api.scripting.SlingScriptHelper sling)
-
Constructor Details
-
FieldComponent
public FieldComponent()
-
-
Method Details
-
setup
public final void setup(String name, AccessibleObject fieldOrMethod, FormField field, org.apache.sling.api.scripting.SlingScriptHelper sling) -
init
public abstract void init() -
setHelper
public final void setHelper(org.apache.sling.api.scripting.SlingScriptHelper helper) -
getHelper
public final org.apache.sling.api.scripting.SlingScriptHelper getHelper() -
setPath
-
getPath
-
getAccessibleObject
-
getFieldDefinition
-
getHtml
-
buildComponentResource
public org.apache.sling.api.resource.Resource buildComponentResource()If your component needs child nodes then override this method, call the superclass implementation, and then use addChildren to add additional nodes to it.- Returns:
-
getProperties
- Returns:
- the component's properties
-
getClientLibraryCategories
-
addClientLibrary
-
addClientLibraries
-
addClientLibraries
public final void addClientLibraries(FieldComponent.ClientLibraryType type, Collection<String> categories) -
addClientLibraries
-
getResourceType
- Returns:
- the resourceType
-
setResourceType
- Parameters:
resourceType- the resourceType to set
-
getResourceSuperType
- Returns:
- the resourceSuperType
-
setResourceSuperType
- Parameters:
resourceSuperType- the resourceSuperType to set
-
purgeEmptyProperties
public final void purgeEmptyProperties() -
getName
- Returns:
- the name
-
getOptionNames
-
hasOption
-
getOption
-
getBooleanOption
-
getCategory
- Returns:
- the category
-
setCategory
- Parameters:
category- the category to set
-