Class AnnotationEventDispatcher

java.lang.Object
org.wicketstuff.event.annotation.AnnotationEventDispatcher
All Implemented Interfaces:
IComponentInstantiationListener, IEventDispatcher

public class AnnotationEventDispatcher extends Object implements IEventDispatcher, IComponentInstantiationListener

Delivers events to any Component methods that are annotated with OnEvent annotation and take exactly one parameter that matches the event payload type. To use this dispatcher, you should register it as a component instantiation listener and an event dispatcher in the application initialization, for example:

AnnotationEventDispatcher dispatcher = new AnnotationEventDispatcher(); getComponentInstantiationListeners().add(dispatcher); getFrameworkSettings().add(dispatcher);