Interface ModalLinkColumn<C extends ModalLinkColumn<C>>

All Superinterfaces:
Column<C>, Comparable<C>, Component<C>, Copyable<C>, CustomCssComponent<C>, Form<C>, Serializable, Trackable<C>
All Known Implementing Classes:
DefaultModalLinkColumn

public interface ModalLinkColumn<C extends ModalLinkColumn<C>> extends Column<C>, Form<C>, Trackable<C>
Represents the metadata for a ColumnTypes.MODAL_LINK column. This will render a link in a column that when activated opens a modal form.

By default, a ModalLinkColumn.EndpointTypes.SUBMIT endpoint can be defined that will be called when the modal is submitted. This interface can be extended to create specific modals for creation, updating, and deleting entities, and other endpoints for other specific actions.

Since:
Metadata Service 2.0.8, Release Train 2.1.6
Author:
Julia Lopez-Pozas (jlopezpozas)
  • Method Details

    • submitLabel

      default C submitLabel(InternationalizedMessage submitLabel)
      Sets the label for the submit button within the modal form.
      Parameters:
      submitLabel - the submit label
      Returns:
      the action
    • submitLabel

      default C submitLabel(String submitLabelKey)
      Sets the label for the submit button within the modal form.
      Parameters:
      submitLabelKey - the submit label message key
      Returns:
      the action
    • modalSize

      default C modalSize(String modalSize)
      Sets the size for the modal dialog. Accepted values are sm, lg, and xl. lg is the default size for modals unless the form has a Query Builder or Rule Builder field, in which case the modal default size is xl.
      Parameters:
      modalSize - the modal size
      Returns:
      the action
    • titleField

      default C titleField(String titleField)
      Sets the field to get the modal title from.
      Parameters:
      titleField - the field to get the modal title from
      Returns:
      the action
    • submitEndpoint

      default C submitEndpoint(Endpoint<?> endpoint)
      Configure the ModalLinkColumn.EndpointTypes.SUBMIT endpoint.
      Parameters:
      endpoint - the endpoint
      Returns:
      this
    • submitEndpoint

      default C submitEndpoint(UnaryOperator<Endpoint<?>> fn)
      Configure the ModalLinkColumn.EndpointTypes.SUBMIT endpoint.
      Parameters:
      fn - the function to configure the endpoint
      Returns:
      this
    • submitUrl

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

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

      default C submitUrl(String url, String scope)
      Configure the ModalLinkColumn.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
    • submitConfirmationMessage

      default C submitConfirmationMessage(InternationalizedMessage message)
      Sets a message to display to the before submitting the modal form.
      Parameters:
      message - a message to display to the before submitting the modal form.
      Returns:
      this
      See Also:
    • submitConfirmationMessage

      default C submitConfirmationMessage(String messageKey)
      Sets a message key to display to the before submitting the modal form.
      Parameters:
      messageKey - a message key to display to the before submitting the modal form.
      Returns:
      this
      See Also:
    • removeSubmitConfirmationMessage

      default C removeSubmitConfirmationMessage()
      Removes the submit confirmation message.
      Returns:
      this
      See Also:
    • autoFocus

      default C autoFocus(boolean autoFocus)
      Sets whether the modal should automatically focus on the first input field when opened. Default is true.
      Parameters:
      autoFocus - whether to autofocus
      Returns:
      the action
    • autoFocus

      default C autoFocus()
      Enables autofocus for the modal.
      Returns:
      the action
    • noAutoFocus

      default C noAutoFocus()
      Disables autofocus for the modal.
      Returns:
      the action
    • showCloseButtonInFooter

      default C showCloseButtonInFooter(boolean showCloseButtonInFooter)
      Sets whether to show a close button in the footer of the modal. Default is false.
      Parameters:
      showCloseButtonInFooter - whether to show the close button in the footer
      Returns:
      the action
    • showCloseButtonInFooter

      default C showCloseButtonInFooter()
      Enables the close button in the footer of the modal.
      Returns:
      the action
    • noCloseButtonInFooter

      default C noCloseButtonInFooter()
      Disables the close button in the footer of the modal.
      Returns:
      the action
    • closeButtonLabel

      default C closeButtonLabel(InternationalizedMessage closeButtonLabel)
      Sets the label for the close button in the footer of the modal. Default is "Close". Implies the close button is shown in the footer.
      Parameters:
      closeButtonLabel - the close button label
      Returns:
      the action
    • closeButtonLabel

      default C closeButtonLabel(String closeButtonLabelKey)
      Sets the label for the close button in the footer of the modal. Default is "Close". Implies the close button is shown in the footer.
      Parameters:
      closeButtonLabelKey - the close button label message key
      Returns:
      the action
    • submitColor

      default C submitColor(String submitColor)
      Sets the color for the submit button within the modal form.
      Parameters:
      submitColor - the submit color
      Returns:
      the action
      See Also: