When I use 2 different publishData functions inside startup () of Widget A, I want to send out the message: ‘ABCD’. See codes below:
startup: function() {
this.inherited(arguments);
this.publishData({
message: 'ABCD'
});
this.publishData({
message: 'XYZ'
});
} // start up ends here
Then I set up the onReceiveData function in Layer List widget as the following; I want to receive this signal 'ABCD' from Widget A and display it (I don’t want XYZ to be passed since it will be used for another function). See codes below:
onReceiveData: function (name, widgetId, data, historyData) {
if (name === 'Widget A'&& data.hasOwnProperty(‘ABCD')) {
alert("The Layer List Widget received the signal ABCD");