Module: alfresco/dialogs/AlfFormDialog

alfresco/dialogs/AlfFormDialog

This extends the default dialog to set up a dialog that is specifically designed to contain form widgets (e.g. text boxes, [checkboxes]{@link module:alfresco/forms/controls/CheckBox}, etc) such that when the form is confirmed a payload containing the value retrieved from the form is published on the formSubmissionTopic.

PLEASE NOTE: There is some overlap/duplication of code with _AlfCreateFormDialogMixin

Deprecated:
Author:
  • Dave Draper
License:
Source:

Members

_formConfirmationTopic :string

Type:
  • string
Default Value:
  • "ALF_CREATE_FORM_DIALOG_MIXIN_CONFIRMATION_TOPIC"
Source:

dialogCancellationButtonTitle :string

TODO: Default needs localizing
Type:
  • string
Default Value:
  • "Cancel"
Source:

dialogConfirmationButtonTitle :string

TODO: Default needs localizing
Type:
  • string
Default Value:
  • "OK"
Source:

dialogTitle :string

The title for the dialog.
Type:
  • string
Source:

formSubmissionPayload :object

This provides a base payload that will be augmented with the values from the form.
Type:
  • object
Default Value:
  • null
Source:

formSubmissionTopic :string

The topic that will be published on when the dialog is confirmed.
Type:
  • string
Source:

Methods

constructor(formConfig) → {object}

Sets up the form specific configuration for the dialog.
Parameters:
Name Type Description
formConfig object
Source:
Returns:
The dialog configuration.
Type
object

createDialogConfig(formConfig) → {object}

Creates the configuration object to pass to the dialog.
Parameters:
Name Type Description
formConfig object
Source:
Returns:
The dialog configuration.
Type
object

createFormConfig(widgets) → {object}

Creates and returns the form configuration to be added to the dialog
Parameters:
Name Type Description
widgets object This is the configuration of the fields to be included in the form.
Source:
Returns:
The configuration for the form to add to the dialog
Type
object

onDialogConfirmation(payload)

This handles the user clicking the confirmation button on the dialog (typically, and by default the "OK" button). This has a special handler to process the payload and construct a simple object reqpresenting the content of the inner form.
Parameters:
Name Type Description
payload object The dialog content
Source: