Interface Container

All Superinterfaces:
ComponentExporter, ContainerExporter

@ConsumerType public interface Container extends ContainerExporter
Defines the form Container 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

    Modifier and Type
    Method
    Description
    default String
    Returns the form's submit method (the value of the form's HTML action attribute).
    default String
    Returns the form's encoding type (the value of the form's HTML enctype attribute).
    default @Nullable String[]
    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>
    Returns the map of all exported child items (resource names from Sling Model classes).
    default @NotNull String[]
    Returns the order of items in the map.
    default @NotNull String
    Returns the type of the resource for which the export is performed.
    default String
    Returns the form's id (the value of the form's HTML id attribute).
    default String
    Returns the form's submit method (the value of the form's HTML method attribute).
    default String
    Returns the form's name (the value of the form's HTML name attribute).
    default String
    This method returns the redirect url property of this form.
    default String
    Returns the resource type for the "new" section in the core form container where other input components will be dropped.
  • Method Details

    • getMethod

      default String getMethod()
      Returns the form's submit method (the value of the form's HTML method 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 String getAction()
      Returns the form's submit method (the value of the form's HTML action 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 String getId()
      Returns the form's id (the value of the form's HTML id 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 String getName()
      Returns the form's name (the value of the form's HTML name 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 String getEnctype()
      Returns the form's encoding type (the value of the form's HTML enctype 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 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 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 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: 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 interface ContainerExporter
      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:
    • getExportedItems

      @NotNull default @NotNull Map<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 interface ContainerExporter
      Returns:
      the map of all exported child items
      Since:
      com.adobe.cq.wcm.core.components.models.form 14.2.0
      See Also:
    • getExportedType

      @NotNull default @NotNull 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 interface ComponentExporter
      Returns:
      the type of the component
      Since:
      com.adobe.cq.wcm.core.components.models.form 14.2.0
      See Also: