Interface RowModalFormAction<A extends RowModalFormAction<A>>

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

public interface RowModalFormAction<A extends RowModalFormAction<A>> extends ModalFormAction<A>
A generic ModalFormAction for row-level actions within a grid. This action is primarily useful in scenarios when interacting with an ad-hoc submission API that does not follow typical CRUD conventions.
Author:
Nick Crum (ncrum)
  • Method Details

    • iconName

      default A iconName(String iconName)
      The name of the icon to use for the row action. If none provided, the label will be rendered. It is recommended to supply an icon name for better usability.

      See http://www.zondicons.com/icons.html for a list of icon names available.

      Parameters:
      iconName - the name of the icon.
      Returns:
      this
    • iconColor

      default A iconColor(String iconColor)
      The color of the icon to use for the row action.
      Parameters:
      iconColor - the color of the icon.
      Returns:
      this
    • mapInitialValues

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

      default A mapInitialValues(Collection<Mapping<?>> mappingsToAdd)
      Configure mappings from the row or context to the create form's state. This is used in order to ensure the submission of form data inherits certain values from the row or context.
      Parameters:
      mappingsToAdd - the mappings to add
      Returns:
      the action
      See Also:
    • refreshOnMount

      default A refreshOnMount()
      Indicate this action should trigger a refresh of the parent FetchGrid after a successful submission.
      Returns:
      this
    • notRefreshOnMount

      default A notRefreshOnMount()
      Indicate this action should not trigger a refresh of the parent FetchGrid after a successful submission.
      Returns:
      this
    • unsetRefreshOnMount

      default A unsetRefreshOnMount()
      Undo a previous call to refreshOnMount() or notRefreshOnMount().
      Returns:
      this
      Since:
      2.x.x
    • submitEndpoint

      default A submitEndpoint(Endpoint<?> endpoint)
      Parameters:
      endpoint - the endpoint
      Returns:
      this
    • submitEndpoint

      default A submitEndpoint(UnaryOperator<Endpoint<?>> fn)
      Parameters:
      fn - the function to configure the endpoint
      Returns:
      this
    • submitUrl

      default A submitUrl(String url)
      Configure the RowModalFormAction.EndpointTypes.SUBMIT endpoint URL.
      Parameters:
      url - the endpoint url
      Returns:
      this
    • submitScope

      default A submitScope(String scope)
      Configure the RowModalFormAction.EndpointTypes.SUBMIT endpoint scope.
      Parameters:
      scope - the endpoint scope
      Returns:
      this
    • submitUrl

      default A submitUrl(String url, String scope)
      Configure the RowModalFormAction.EndpointTypes.SUBMIT endpoint URL and scope.
      Parameters:
      url - the endpoint url
      scope - the endpoint scope
      Returns:
      this
    • getSubmitEndpoint

      default Endpoint<?> getSubmitEndpoint()
      Returns:
      the endpoint
    • findSubmitEndpoint

      default Optional<Endpoint<?>> findSubmitEndpoint()
      Returns:
      an optional with the endpoint