Package org.wicketstuff.event.annotation
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);
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchEvent
(Object sink, IEvent<?> event, Component component) void
onInstantiation
(Component component)
-
Constructor Details
-
AnnotationEventDispatcher
public AnnotationEventDispatcher()
-
-
Method Details
-
onInstantiation
- Specified by:
onInstantiation
in interfaceIComponentInstantiationListener
-
dispatchEvent
- Specified by:
dispatchEvent
in interfaceIEventDispatcher
-