mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-05 06:41:42 +08:00
72 lines
2.4 KiB
XML
72 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
LIGHTNING MESSAGE CHANNEL TEMPLATE
|
|
|
|
Message channels enable communication between LWC components
|
|
that don't have a parent-child relationship (cross-DOM communication).
|
|
|
|
Use cases:
|
|
- Components on different parts of the page
|
|
- LWC to Aura communication
|
|
- LWC to Visualforce communication
|
|
|
|
Replace: RecordSelected → YourChannelName
|
|
-->
|
|
<LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
<!-- Human-readable label shown in Setup -->
|
|
<masterLabel>Record Selected</masterLabel>
|
|
|
|
<!-- Description for documentation -->
|
|
<description>
|
|
Message channel for communicating record selection events between
|
|
components across the page. Used when a user selects a record in
|
|
one component and other components need to react.
|
|
</description>
|
|
|
|
<!-- Expose to Lightning web components -->
|
|
<isExposed>true</isExposed>
|
|
|
|
<!--
|
|
Message payload fields.
|
|
Define all data that can be sent through the channel.
|
|
-->
|
|
<lightningMessageFields>
|
|
<!-- Record ID field -->
|
|
<fieldName>recordId</fieldName>
|
|
<description>The Id of the selected record</description>
|
|
</lightningMessageFields>
|
|
|
|
<lightningMessageFields>
|
|
<!-- Record Name field -->
|
|
<fieldName>recordName</fieldName>
|
|
<description>The name of the selected record</description>
|
|
</lightningMessageFields>
|
|
|
|
<lightningMessageFields>
|
|
<!-- Object API Name field -->
|
|
<fieldName>objectApiName</fieldName>
|
|
<description>The API name of the object (e.g., Account, Contact)</description>
|
|
</lightningMessageFields>
|
|
|
|
<lightningMessageFields>
|
|
<!-- Source Component field -->
|
|
<fieldName>sourceComponent</fieldName>
|
|
<description>The name of the component that published this message</description>
|
|
</lightningMessageFields>
|
|
|
|
<lightningMessageFields>
|
|
<!-- Timestamp field -->
|
|
<fieldName>timestamp</fieldName>
|
|
<description>When the selection occurred (ISO 8601 format)</description>
|
|
</lightningMessageFields>
|
|
|
|
<!--
|
|
Additional fields for complex payloads.
|
|
Use JSON strings for nested data.
|
|
-->
|
|
<lightningMessageFields>
|
|
<fieldName>payload</fieldName>
|
|
<description>Additional data as JSON string for complex scenarios</description>
|
|
</lightningMessageFields>
|
|
</LightningMessageChannel>
|