Module: alfresco/dialogs/_AlfCreateFormDialogMixin

alfresco/dialogs/_AlfCreateFormDialogMixin

This mixin is intended to be mixed into any buttons or menu items that require an action that creates a new dialog that contains a form. Examples of use include the create content menu items in the document library.
Deprecated:
Author:
  • Dave Draper
License:
Source:

Members

dialog :object

Keeps a reference to any dialogs that are created. Old dialogs are destroyed before new ones are created.
Type:
  • object
Default Value:
  • null
Source:

dialogCancellationButtonTitle :string

Type:
  • string
Default Value:
  • null
Source:

dialogConfirmationButtonTitle :string

Type:
  • string
Default Value:
  • null
Source:

dialogTitle :string

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

formSubmissionGlobal :boolean

Whether or not the formSubmissionTopic should be published globally.
Type:
  • boolean
Default Value:
  • true
Source:

formSubmissionToParent :boolean

Whether or not the formSubmissionTopic should be published on the mixing widgets parent pubSubScope.
Type:
  • boolean
Default Value:
  • false
Source:

formSubmissionTopic :string

This is the topic that will be published when the dialog is "confirmed" (e.g. the "OK" button is clicked)
Type:
  • string
Default Value:
  • null
Source:

widgets :object

The configuration for the contents of the dialog to be displayed. This should be provided either on instantiation or by the widget that mixes this module in
Type:
  • object
Default Value:
  • null
Source:

Methods

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

onCreateFormDialogRequest(payload)

Handles requests to create the dialog containining a form. It will delete any previously created dialog (to ensure no stale data is displayed) and create a new dialog containing the form defined.
Parameters:
Name Type Description
payload object The payload published on the request topic.
Source:

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:

postCreate()

Create a new 'publishTopic' for the action and generates a new 'pubSubScope' and then sets up subscriptions for handling show dialog and cancel dialog requests.
Source: