05-31-2018 03:31 AM
Hi,
I want to render a parameter whose value is an array of elements (each element has, for example, a name and an identifier). As a result, I should get a list of names (in a string separated by a comma), when you click on the name, you should publish a topic containing the identifier. Any ideas how to implement such a widget?
Now I have a simple widget with html-links but I need to publish a topic instead of following a link.
05-31-2018 07:09 AM
I add publication function to each item of my list
{...
this._attach(itemNode, "ondijitclick", lang.hitch(this, this.onClick, item.name));
...
},
onClick: function alfresco_navigation_Link__onClick(name,evt) {
event.stop(evt);
if (this.publishTopic != null)
{
this.alfPublish(this.publishTopic, {name:name});
}
}
(by analogy with the widget "alfresco/navigation/Link").
05-31-2018 07:09 AM
I add publication function to each item of my list
{...
this._attach(itemNode, "ondijitclick", lang.hitch(this, this.onClick, item.name));
...
},
onClick: function alfresco_navigation_Link__onClick(name,evt) {
event.stop(evt);
if (this.publishTopic != null)
{
this.alfPublish(this.publishTopic, {name:name});
}
}
(by analogy with the widget "alfresco/navigation/Link").
Explore our Alfresco products with the links below. Use labels to filter content by product module.