Skip to content

MessageServiceHandler

James Hou edited this page Jan 24, 2021 · 2 revisions

As of Summer 20, Lightning Message Service requires rendering on the DOM to be connected.

Because of this limitation, this component is designed to be placed once on the utility bar (rendered, but hidden label) OR per flexipage.

The primary use case for this component is to parse the messageService.dialogService() payload. It expects two properties:

const flowOrDialogServicePayload = {
    method: 'bodyModal', // or bodyModalLarge, flowModal, flowModalLarge
    config: {
        <see flowWizardLauncherExample>
        <or soqlDatatableLauncherExample>
    }
}

This component is very simple which just listens and delegates to DialogService.

It can easily be extended to include other Aura only APIs, such as lightning:workspaceAPI.

<aura:component implements="lightning:utilityItem">
    <c:DialogService aura:id="dialogService" />
    <c:messageService aura:id="messageService" onopendialog="{! c.handleDialogService }" />
    <c:singleton aura:id="singleton" />
</aura:component>

Specification

Attributes

None

Public Methods

None

Clone this wiki locally