Module: alfresco/html/Label

alfresco/html/Label

This module has been somewhat unfortunately named as it creates an HTML element rather than an HTML
Author:
  • Dave Draper
License:
Source:

Examples

Basic configuration:

{
  name: "alfresco/html/Label",
  config: {
    label: "Look at this!"
  }
}

Dynamic configuration (updates the label to show the "display.me" property from the published payload):

{
  name: "alfresco/html/Label",
  config: {
    label: "Look at this!"
    subscriptionTopic: "UPDATE_LABEL",
    subscriptionPayloadProperty: "display.me"
  }
}

Mixes In

Members

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/Label.css"}]
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/Label.properties"}]
Source:

label :string

The label to display.
Type:
  • string
Source:

subscriptionPayloadProperty :string

This is the property in any payload published on the subscriptionTopic to be used for the updated display.
Type:
  • string
Since:
  • 1.0.46
Default Value:
  • "label"
Source:

subscriptionTopic :string

This is an optional topic that can be subscribed that when published will update the displayed label.
Type:
  • string
Since:
  • 1.0.2
Default Value:
  • null
Source:

templateString :String

The HTML template to use for the widget.
Type:
  • String
Source:

Methods

onLabelUpdate(payload)

This function is called when the subscriptionTopic is published. It will then set the subscriptionPayloadProperty from the payload as the new label.
Parameters:
Name Type Description
payload object The details of the label update
Source:

postMixInProperties()

Source: