Module: alfresco/core/DynamicWidgetProcessing

alfresco/core/DynamicWidgetProcessing

This should be mixed into any widgets or services that need to be able to have additional widgets be added to them.
Author:
  • Dave Draper
License:
Source:

Methods

addWidgetDynamically(targetId, targetPosition, widget, index)

Dynamically adds a widget.
Parameters:
Name Type Description
targetId string The attribute name of the widget to add the widgets to
targetPosition string The position at which to add the widget to the DOM node (e.g. first or last)
widget object The widget to add
index integer The index of the widget
Source:

postCreate()

Source:

processDynamicUpdates(payload)

Processes a request to add a new widget. The following attributes are required.
  • "targetId" - the id of the widget to be added to
  • "widgets" - the widgets to add
  • "targetNode" - the DOM node name to target, defaults to "domNode"
  • "targetPosition" - either "first" or "last", defaults to "first"
Parameters:
Name Type Description
payload object The payload received on the updateTopic
Source: