I'm working on an Aikau page for Alfresco Share containing a custom widget on one side and an Aikau form on the other.
I would like one of the form inputs to be populated by data obtained from clicking a button in the custom widget, so I declared my input with valueSubscriptionTopic like this:
var dateOfReportTextBox = {
name: "alfresco/forms/controls/TextBox",
config: {
fieldId: "DATE_OF_REPORT",
name: "cm:date-of-report",
label: "Date of Report",
placeHolder: "date",
requirementConfig: {
initialValue: false
},
valueSubscriptionTopic: "SET_DATE_OF_REPORT"
}
};
In my custom widget code I attached an event handler to the button containing this line:
this.alfPublish("SET_DATE_OF_REPORT", "Testing", true); // true for global scope
But the input is not being populated. I verified that "this" refers to the custom widget. Am I misunderstanding the usage of valueSubscriptionTopic?