Search code examples
javamethodstapestry

Tapestry - executed method for an event


Im working with Tapestry. I need the Eventhandler method before the eventhandler is executed.

I found ComponentRequestFilter but there i may only get the ComponentEventRequestParameters . I dont know how to extract the eventhandlermethod from there. I could try to build the method name, but then i wouldnt cover @Onevent. I have read the source code of tapestry for > 2 h, but i couldnt find any relevant piece of code.


Solution

  • Basically put, you can't. Tapestry "triggers" the event on a component, and searches the component, it's base class, and any mixins (and base classes) for event handler methods. You don't ever directly invoke a method (it is not a one-to-one mapping).

    Generally, this kind of query is fruitless ... I can't imagine WHY you would need this information (what event, as if there was only one, will be invoked). Instead, what is your real requirement ... what are you trying to do?

    You may have better luck on the Apache Tapestry user mailing list, as well.