Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: Core Actions
    • Labels:
      None

      Description

      I'm currently leveraging AppFuse for my projects. Currently I'm using Struts 2 for the Web part (previously Spring MVC).
      AppFuse has GenericDao and GenericManager which I think very useful (for lazy person like me).
      But my lazyness doesn't stop there. After using zeroconf and codebehind, I want more. I want generic action.

      I created one, it passed the test (i created a unit test) but i can't find a way to make Struts(with codebehind enabled) "aware" of this special class.
      Btw I'm using Spring for handling the actions.

      Here's my posting in AppFuse's forum:
      http://www.nabble.com/forum/ViewPost.jtp?post=9981357&framed=y&skin=2369

        Activity

        Hide
        musachy added a comment -

        I think there are already a few mechanisms in place to do this. Convention supports multiple @Action annotations, and multiple Unknown handlers can now be chained. Should we do more than that?

        Show
        musachy added a comment - I think there are already a few mechanisms in place to do this. Convention supports multiple @Action annotations, and multiple Unknown handlers can now be chained. Should we do more than that?
        Hide
        Jeromy Evans added a comment -

        Split to WW-2702 (change to CodebehindUnknownHandler to use PackageConfig.defaultClassRef)

        Show
        Jeromy Evans added a comment - Split to WW-2702 (change to CodebehindUnknownHandler to use PackageConfig.defaultClassRef)
        Hide
        Jeromy Evans added a comment -

        The UnknownHandler is currently hardcoded to create an ActionSupport instance. If the UnknownHandler creates an instance of the class specified by PackageConfig.defaultClassRef then this requirement will be met. Won't it?

        ie. on a per package basis, you can specify a generic action that will handle invocations where no other was matched.

        The Unknown action handling actually already doesn't work when used with the REST Plugin as ActionSupport doesn't have an index() method, which is my real motivation for the change.

        Show
        Jeromy Evans added a comment - The UnknownHandler is currently hardcoded to create an ActionSupport instance. If the UnknownHandler creates an instance of the class specified by PackageConfig.defaultClassRef then this requirement will be met. Won't it? ie. on a per package basis, you can specify a generic action that will handle invocations where no other was matched. The Unknown action handling actually already doesn't work when used with the REST Plugin as ActionSupport doesn't have an index() method, which is my real motivation for the change.
        Hide
        Don Brown added a comment -

        I like this idea. I'm in a similar situation, which I resolved by using wildcards in struts.xml so that I have one action mapping for all actions in a package. Still I think we could do more with a plugin that uses an UnknownHandler and/or multiple action annotations on the generic action.

        Show
        Don Brown added a comment - I like this idea. I'm in a similar situation, which I resolved by using wildcards in struts.xml so that I have one action mapping for all actions in a package. Still I think we could do more with a plugin that uses an UnknownHandler and/or multiple action annotations on the generic action.

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Wiradikusuma
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development