Hi Thorsten,

in Wicket 8 there's one method left only: it is always #onRequest().

What methods are you iterating over in onEventMethods?

Regards
Sven


On 01.10.19 16:29, Thorsten Schöning wrote:

Guten Tag Thorsten Schöning,
am Dienstag, 1. Oktober 2019 um 16:15 schrieben Sie:

         public boolean canCallListener(Method method)
         {
                 if (method.isAnnotationPresent(OnEvent.class))
                 {
                         return true;
                 }

                 return super.canCallListener(method);
         }
That callback doesn't exist anymore and I'm wondering how I'm able to
recognize my custom event?[...]
That statement is misleading: I don't want to recognize my custom
event, but AnnotationEventDispatcher trying to send that to me
instead. AnnotationEventDispatcher gets all methods annotated using
"@OnEvent" and in Wicket 7 was checking if to dispatch an event to a
component using those methods.

for (Method method : onEventMethods)
{
     if (canCallListenerInterface(sink, method))
     {
That way I could be somewhat sure to only return "true" for my own
custom event. With removing the "Method"-argument I don't know how to
distinguish AnnotationEventDispatcher from everything else anymore.

Mit freundlichen Grüßen,

Thorsten Schöning

Reply via email to