Interface Container
-
- All Superinterfaces:
ComponentExporter
,ContainerExporter
@ConsumerType public interface Container extends ContainerExporter
Defines the formContainer
Sling Model used for the/apps/core/wcm/components/form/container
component.- 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 java.lang.String
getAction()
Returns the form's submit method (the value of the form's HTMLaction
attribute).default java.lang.String
getEnctype()
Returns the form's encoding type (the value of the form's HTMLenctype
attribute).default @Nullable java.lang.String[]
getErrorMessages()
This method returns a general error messages which should be displayed inside of the form if the submit action fails.default @NotNull java.util.Map<java.lang.String,? extends ComponentExporter>
getExportedItems()
Returns the map of all exported child items (resource names from Sling Model classes).default @NotNull java.lang.String[]
getExportedItemsOrder()
Returns the order of items in the map.default @NotNull java.lang.String
getExportedType()
Returns the type of the resource for which the export is performed.default java.lang.String
getId()
Returns the form's id (the value of the form's HTMLid
attribute).default java.lang.String
getMethod()
Returns the form's submit method (the value of the form's HTMLmethod
attribute).default java.lang.String
getName()
Returns the form's name (the value of the form's HTMLname
attribute).default java.lang.String
getRedirect()
This method returns the redirect url property of this form.default java.lang.String
getResourceTypeForDropArea()
Returns the resource type for the "new" section in the core form container where other input components will be dropped.
-
-
-
Method Detail
-
getMethod
default java.lang.String getMethod()
Returns the form's submit method (the value of the form's HTMLmethod
attribute).- Returns:
- form submit method (method attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
default
in 14.1.0
-
getAction
default java.lang.String getAction()
Returns the form's submit method (the value of the form's HTMLaction
attribute).- Returns:
- form submit action (used in action attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
default
in 14.1.0
-
getId
default java.lang.String getId()
Returns the form's id (the value of the form's HTMLid
attribute).- Returns:
- form id (used in id attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
default
in 14.1.0
-
getName
default java.lang.String getName()
Returns the form's name (the value of the form's HTMLname
attribute).- Returns:
- form name (used in name attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
default
in 14.1.0
-
getEnctype
default java.lang.String getEnctype()
Returns the form's encoding type (the value of the form's HTMLenctype
attribute).- Returns:
- form data enctype (used in enctype attribute of form)
- Since:
- com.adobe.cq.wcm.core.components.models.form 13.0.0; marked
default
in 14.1.0
-
getResourceTypeForDropArea
default java.lang.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
default
in 14.1.0
-
getRedirect
default java.lang.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
default
in 14.1.0
-
getErrorMessages
@Nullable default @Nullable java.lang.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 java.lang.String[] getExportedItemsOrder()
Description copied from interface:ContainerExporter
Returns 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:
getExportedItemsOrder
in 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 java.util.Map<java.lang.String,? extends ComponentExporter> getExportedItems()
Description copied from interface:ContainerExporter
Returns 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:
getExportedItems
in 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 java.lang.String getExportedType()
Description copied from interface:ComponentExporter
Returns 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:
getExportedType
in interfaceComponentExporter
- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models.form 14.2.0
- See Also:
ComponentExporter.getExportedType()
-
-