Interface Container
-
- All Superinterfaces:
ComponentExporter,ContainerExporter
@ConsumerType public interface Container extends ContainerExporter
Defines the formContainerSling Model used for the/apps/core/wcm/components/form/containercomponent.- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default StringgetAction()Returns the form's submit method (the value of the form's HTMLactionattribute).default StringgetEnctype()Returns the form's encoding type (the value of the form's HTMLenctypeattribute).default @Nullable String[]getErrorMessages()This method returns a general error messages which should be displayed inside of the form if the submit action fails.default @NotNull Map<String,? extends ComponentExporter>getExportedItems()Returns the map of all exported child items (resource names from Sling Model classes).default @NotNull String[]getExportedItemsOrder()Returns the order of items in the map.default @NotNull StringgetExportedType()Returns the type of the resource for which the export is performed.default StringgetId()Returns the form's id (the value of the form's HTMLidattribute).default StringgetMethod()Returns the form's submit method (the value of the form's HTMLmethodattribute).default StringgetName()Returns the form's name (the value of the form's HTMLnameattribute).default StringgetRedirect()This method returns the redirect url property of this form.default StringgetResourceTypeForDropArea()Returns the resource type for the "new" section in the core form container where other input components will be dropped.
-
-
-
Method Detail
-
getMethod
default String getMethod()
Returns the form's submit method (the value of the form's HTMLmethodattribute).- Returns:
- form submit method (method attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getAction
default String getAction()
Returns the form's submit method (the value of the form's HTMLactionattribute).- Returns:
- form submit action (used in action attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getId
default String getId()
Returns the form's id (the value of the form's HTMLidattribute).- Returns:
- form id (used in id attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getName
default String getName()
Returns the form's name (the value of the form's HTMLnameattribute).- Returns:
- form name (used in name attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getEnctype
default String getEnctype()
Returns the form's encoding type (the value of the form's HTMLenctypeattribute).- Returns:
- form data enctype (used in enctype attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getResourceTypeForDropArea
default String getResourceTypeForDropArea()
Returns the resource type for the "new" section in the core form container where other input components will be dropped.- Returns:
- resource type for the "new" section in core form container where other input components will be dropped
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getRedirect
default String getRedirect()
This method returns the redirect url property of this form. If the current sling request has a non-blank context path, the context path is prepended to the redirect url if the redirect is an absolute path starting with '/'. This method also appends ".html" to the redirect path.- Returns:
- The form redirect url (used in the :redirect hidden input field of the form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
defaultin 14.1.0
-
getErrorMessages
@Nullable default @Nullable String[] getErrorMessages()
This method returns a general error messages which should be displayed inside of the form if the submit action fails.- Returns:
- The general error message
- Since:
- com.adobe.cq.wcm.core.components.models.form 14.3.0
-
getExportedItemsOrder
@NotNull default @NotNull String[] getExportedItemsOrder()
Description copied from interface:ContainerExporterReturns the order of items in the map.
NOTE: This information is required because the JSON specification and most implementations don't provide a stable order of items in JSON objects. Methods whose JSON serialization would lead to the same JSON property name (":order") will not be serialized.
- Specified by:
getExportedItemsOrderin interfaceContainerExporter- Returns:
- the order of the items in the map; the array can be empty if the item order is not provided by the underlying persistence layer
- Since:
- com.adobe.cq.wcm.core.components.models.form 14.2.0
- See Also:
ContainerExporter.getExportedItemsOrder()
-
getExportedItems
@NotNull default @NotNull Map<String,? extends ComponentExporter> getExportedItems()
Description copied from interface:ContainerExporterReturns the map of all exported child items (resource names from Sling Model classes).
NOTE: Methods whose JSON serialization would lead to the same JSON property name (":items") will not be serialized.
- Specified by:
getExportedItemsin interfaceContainerExporter- Returns:
- the map of all exported child items
- Since:
- com.adobe.cq.wcm.core.components.models.form 14.2.0
- See Also:
ContainerExporter.getExportedItems()
-
getExportedType
@NotNull default @NotNull String getExportedType()
Description copied from interface:ComponentExporterReturns the type of the resource for which the export is performed.
NOTE: methods whose JSON serialization would lead to the same JSON property name (":type") will not be serialized.
- Specified by:
getExportedTypein interfaceComponentExporter- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models.form 14.2.0
- See Also:
ComponentExporter.getExportedType()
-
-