|Home > Guides > Tag Developers Guide > Struts Tags > UI Tags > Themes and Templates > ajax theme > ajax event system|
As you may have seen with the ajax div template and ajax a template, the framework and Dojo provide a nice way to subscribe and notify of topics from within the browser. A benifit of using Dojo as the basis of many of these components is being able to loosely couple UI components. There are two attributes of importance:
notifyTopicsattribute, then after the processing has been completed a message with be published to the topic names supplied as a value (comma delimited).
listenTopicsattribute, then when a message is published to the topic names supplied as a value (comma delimited), the component will perform custom tag-specific logic ( i.e a DIV tag will re-fresh its content).
The topic_name attribute is required, the content attribute is not and most elements are triggered without having this attribute. See the ajax div template for an example of this type of interaction.
To subscribe to the topic_name topic: