Struts 2
  1. Struts 2
  2. WW-2449

Support convention based action chaining

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2.1
    • Component/s: Plugin - Convention
    • Labels:
      None

      Description

      Automatically chain actions together based on the return values and the current actions name and namespace. For example,

      package com.example.actions;

      public class FooAction {
      public String execute()

      { return "bar"; }

      }

      This would look for the results foo-bar first and if they don't exist it would chain to an action named foo-bar.

        Activity

        Hide
        Don Brown added a comment -

        Soo, are you still thinking to have this done for 2.1.1? I'm hoping to roll this pretty quick, so I'll move it to 2.1.x if I don't hear different

        Show
        Don Brown added a comment - Soo, are you still thinking to have this done for 2.1.1? I'm hoping to roll this pretty quick, so I'll move it to 2.1.x if I don't hear different
        Hide
        Brian Pontarelli added a comment -

        I could probably get that done. I'll email the group and see what the timelines look like. If I know the 2.1.1 deadlines for milestones and release candidates, I could definitely get it done. Or we could just bump it since it isn't vital.

        Show
        Brian Pontarelli added a comment - I could probably get that done. I'll email the group and see what the timelines look like. If I know the 2.1.1 deadlines for milestones and release candidates, I could definitely get it done. Or we could just bump it since it isn't vital.
        Hide
        musachy added a comment -

        Action chaining implemented on the convention plugin in the sandbox

        Show
        musachy added a comment - Action chaining implemented on the convention plugin in the sandbox
        Hide
        Jeromy Evans added a comment -

        Musachy asked me to do a review. 'll have a proper look, but I don't think I'd ever use this. What the main rationale or use-case?

        In my apps, albeit mainly based on the rest plugin's paradigm, I've never encountered a need to chain. Default and unknown result handlers suit my circumstances. In cases where I have chained actions in the past I've ended up regretting the coupling later and having to remove it.

        I expect there's no harm if its useful though.

        Show
        Jeromy Evans added a comment - Musachy asked me to do a review. 'll have a proper look, but I don't think I'd ever use this. What the main rationale or use-case? In my apps, albeit mainly based on the rest plugin's paradigm, I've never encountered a need to chain. Default and unknown result handlers suit my circumstances. In cases where I have chained actions in the past I've ended up regretting the coupling later and having to remove it. I expect there's no harm if its useful though.
        Hide
        Brian Pontarelli added a comment -

        This was an old request logged in the Smart URLs issue tracker. I just copied it over. I also try to avoid chaining whenever possible so I don't find it a particularly useful addition and is just more behavior that might impact overall usability for a plugin that is supposed to reduce complexity.

        Show
        Brian Pontarelli added a comment - This was an old request logged in the Smart URLs issue tracker. I just copied it over. I also try to avoid chaining whenever possible so I don't find it a particularly useful addition and is just more behavior that might impact overall usability for a plugin that is supposed to reduce complexity.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian Pontarelli
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development