Events


Events

Events in Tapestry are handled by the league/event package. This provides support for Closure or Class based listeners.

Before & After Steps

The Before and After steps fire events named scripts.before and scripts.after. These are useful for plugin writers because for example you can open a connection to a database or API in the Before and close it in the After.

Step Events

An event is fired before and after each step is executed, with the after event only firing if the step returns true when invoked. The event names are all lower case with dot notation, for example: compile.before and compile.after.

Writing Event Listeners