Tapestry
  1. Tapestry
  2. TAPESTRY-838

ListenerInvokerFilter provides no way to find out what listener method is being invoked

    Details

    • Type: Wish Wish
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
      None

      Description

      The ListenerInvokerFilter pipeline appears to be the only place where you can intercept listener method calls. Obviously this can be useful for a variety of features, the Javadoc even suggests it's a good place to put transaction handling. However, there does not seem to be any way to find out what listener method is being invoked. Without that information the only metadata you can provide to the ListenerInvokerFilter is class level metadata since you can get access to the current page through the IRequestCycle. Would it be possible to expose either the listener method being invoked, or in the alternative, provide some form of interception support to pages?

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Added getMethodName() to IActionListener and ListenerMethodInvoker.

        Show
        Jesse Kuhnert added a comment - Added getMethodName() to IActionListener and ListenerMethodInvoker.
        Hide
        Chris Conrad added a comment -

        To comment a little further, from my reading of the Tapestry Hivedoc there are two places I can hook into to intercept calls to components/pages: tapestry.listener.ListenerInvoker and tapestry.request.ServletRequestServicerPipeline/tapestry.request.WebRequestServicerPipeline. The latter is more or less out of the question, you can perform interceptions at an application granularity, you have no access to the current page or components until after everything is rendered. The first is almost there but it provides only page level granularity. You can figure out the current page and you can figure out what component triggered the listener method invocation, but there is no way to see what method was actually invoked and on what object it was invoked on.

        My motivation for this is I'd like to implement some of the features of JBoss Seam into my application. This possible if I stay completely within the realm of Hivemind components, but that requires me to put a lot of effort into creating components and whatnot for simple data collection pages. By providing a more granular interception model for listener method calls I can avoid creating extraneous services which are only necessary for their abillity to be intercepted.

        Show
        Chris Conrad added a comment - To comment a little further, from my reading of the Tapestry Hivedoc there are two places I can hook into to intercept calls to components/pages: tapestry.listener.ListenerInvoker and tapestry.request.ServletRequestServicerPipeline/tapestry.request.WebRequestServicerPipeline. The latter is more or less out of the question, you can perform interceptions at an application granularity, you have no access to the current page or components until after everything is rendered. The first is almost there but it provides only page level granularity. You can figure out the current page and you can figure out what component triggered the listener method invocation, but there is no way to see what method was actually invoked and on what object it was invoked on. My motivation for this is I'd like to implement some of the features of JBoss Seam into my application. This possible if I stay completely within the realm of Hivemind components, but that requires me to put a lot of effort into creating components and whatnot for simple data collection pages. By providing a more granular interception model for listener method calls I can avoid creating extraneous services which are only necessary for their abillity to be intercepted.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Chris Conrad
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development