Annotation Type PublishEvent


Marks an event handler method to be published as an event to be called in JavaScript through the t5/core/ajax function when the options parameter has an element attribute.

The logic for obtaining the URL is actually located implemented in the t5/core/dom.getEventUrl(eventName, element) function.

The event information is stored in JSON format inside the "data-component-events" attribute.

When used in a component method, the component must render at least one element, and that's what gets the "data-component-events" attribute above. If it doesn't, an exception will be thrown.

When used in a page method, the page must render an <body> element. If it doesn't, an exception will be thrown.

Since:
5.4.2
See Also: