public class AnnotationEventDispatcher extends Object implements org.apache.wicket.IEventDispatcher, org.apache.wicket.application.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 and Description |
---|
AnnotationEventDispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
dispatchEvent(Object sink,
org.apache.wicket.event.IEvent<?> event,
org.apache.wicket.Component component) |
void |
onInstantiation(org.apache.wicket.Component component) |
public void onInstantiation(org.apache.wicket.Component component)
onInstantiation
in interface org.apache.wicket.application.IComponentInstantiationListener
public void dispatchEvent(Object sink, org.apache.wicket.event.IEvent<?> event, org.apache.wicket.Component component)
dispatchEvent
in interface org.apache.wicket.IEventDispatcher
Copyright © 2015. All rights reserved.