Interface CreateModalFormAction<A extends CreateModalFormAction<A>>

All Superinterfaces:
Action<A>, Comparable<A>, ConditionalAction<A>, Copyable<A>, FormAction<A>, ModalFormAction<A>, Serializable
All Known Implementing Classes:
DefaultCreateModalFormAction

public interface CreateModalFormAction<A extends CreateModalFormAction<A>> extends ModalFormAction<A>
Extension of ModalFormAction that is used for the creation of new entities.

Adds guidance on configuring CreateModalFormAction.Attributes.MAP_INHERITED_VALUES for create modal form actions.

Author:
Nick Crum (ncrum)
  • Method Details

    • mapInheritedValue

      default A mapInheritedValue(Mapping<?>... mappingsToAdd)
      Configure mappings from the parent data to the create form's state. This is used in order to ensure the creation of an object inherits certain values from the parent, for example:
       // maps the parent form's "id" to the "productId" field in the create form
       action.mapInheritedValue(Mappings.mapValue("id", "productId");
       
      Parameters:
      mappingsToAdd - the mappings to add
      Returns:
      the action
    • mapInheritedValues

      default A mapInheritedValues(Collection<Mapping<?>> mappingsToAdd)
      Configure mappings from the parent data to the create form's state. This is used in order to ensure the creation of an object inherits certain values from the parent.
      Parameters:
      mappingsToAdd - the mappings to add
      Returns:
      the action
      See Also: