Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: Future
    • Fix Version/s: Future
    • Component/s: Other
    • Labels:
      None

      Description

      Is there any concrete plans to provide some integration between struts 2 and spring webflow. There's been some work done already:
      http://opensource.atlassian.com/projects/spring/browse/SWF-76
      http://opensource.atlassian.com/projects/spring/browse/SWF-202

      But this isn't 'official' support. In a discussion with Keith Donald, it seemed like he's pushing for the struts2 codebase to provide the integration suport:
      http://forum.springframework.org/showthread.php?t=31829

      1. spring-webflow-2.0.2-SNAPSHOT.zip
        7 kB
        Tom Schneider
      2. spring-webflow-example.zip
        10 kB
        Tom Schneider
      3. spring-webflow-plugin.zip
        18 kB
        Tom Schneider
      4. struts2-spring-webflow.zip
        7 kB
        Tom Schneider

        Activity

        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jeff Turner made changes -
        Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status (temporary) [ 47282 ] Struts - editable closed status [ 50587 ]
        Antonio Petrelli made changes -
        Workflow Struts - editable closed status [ 42700 ] Struts - editable closed status (temporary) [ 47282 ]
        Jeff Turner made changes -
        Workflow Struts [ 40695 ] Struts - editable closed status [ 42700 ]
        Tom Schneider made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Tom Schneider added a comment -

        This has been implemented as a 3rd party plugin and the one user that currently uses it is very happy with it.

        Show
        Tom Schneider added a comment - This has been implemented as a 3rd party plugin and the one user that currently uses it is very happy with it.
        Tom Schneider made changes -
        Assignee Tom Schneider [ tschneider ]
        Don Brown made changes -
        Workflow jira [ 38972 ] Struts [ 40695 ]
        Hide
        Tom Schneider added a comment -

        Yup, I was going to do that tonight. (I can't seem to remember my apache wiki login at the moment) I also want to get a little something put together in the way of documentation.

        Show
        Tom Schneider added a comment - Yup, I was going to do that tonight. (I can't seem to remember my apache wiki login at the moment) I also want to get a little something put together in the way of documentation.
        Hide
        Don Brown added a comment -

        Cool, feel free to add it to the plugin repository at http://cwiki.apache.org/confluence/display/S2PLUGINS

        Show
        Don Brown added a comment - Cool, feel free to add it to the plugin repository at http://cwiki.apache.org/confluence/display/S2PLUGINS
        Hide
        Tom Schneider added a comment -

        FYI, I've checked in the latest code at http://code.google.com/p/struts2webflow/ so I would have a place to manage the code better. This will be it's home unless the decision is made to include it into the core struts2 codebase.

        Show
        Tom Schneider added a comment - FYI, I've checked in the latest code at http://code.google.com/p/struts2webflow/ so I would have a place to manage the code better. This will be it's home unless the decision is made to include it into the core struts2 codebase.
        Hide
        Don Brown added a comment -

        Hmm...how important is it that we use Spring 2.0? We talked about changing Struts to use it, but I don't know if it'll make 2.0.2.

        Show
        Don Brown added a comment - Hmm...how important is it that we use Spring 2.0? We talked about changing Struts to use it, but I don't know if it'll make 2.0.2.
        Tom Schneider made changes -
        Attachment spring-webflow-plugin.zip [ 13288 ]
        Hide
        Tom Schneider added a comment -

        Here is another update to the spring-webflow-plugin. This latest zip contains both the example and the plugin code. I tested it against the latest 2.0.2-SNAPSHOT and it works great.

        Show
        Tom Schneider added a comment - Here is another update to the spring-webflow-plugin. This latest zip contains both the example and the plugin code. I tested it against the latest 2.0.2-SNAPSHOT and it works great.
        Hide
        Tom Schneider added a comment -

        One more thing--as I was going through the example, I noticed that we can get rid of FlowHelper and let Spring's IOC populate the flowExecutor property of the FlowAction. The only disadvantage is that if you have more than one flow, it would not work. We might want to have a property on the FlowAction that, if populated, will explicitly lookup the given bean name as the flowExecutor bean. By default this property would be null and we would just use IOC to populate the flowExecutor.

        Show
        Tom Schneider added a comment - One more thing--as I was going through the example, I noticed that we can get rid of FlowHelper and let Spring's IOC populate the flowExecutor property of the FlowAction. The only disadvantage is that if you have more than one flow, it would not work. We might want to have a property on the FlowAction that, if populated, will explicitly lookup the given bean name as the flowExecutor bean. By default this property would be null and we would just use IOC to populate the flowExecutor.
        Tom Schneider made changes -
        Attachment spring-webflow-example.zip [ 13280 ]
        Hide
        Tom Schneider added a comment -

        Here is the example I promised. (It took much longer than I thought it would.) It requires spring 2.0 and spring webflow 1.0. I tested it against struts 2.0.1 version of the integration since the latest 2.0.2 snapshot of struts wasn't building for me. (I'll see if 2.0.2 snapshot is working on Monday)

        The example is a simple 2 screen car insurance rating app. The first screen asks the user to enter their age. The next screen will figure out the car insurance rate for the user. (hint: all I do is multiply their age by 2) The FlowScopeInterceptor and the SessionFlowExecKeyInterceptor could probably be made generic and moved into the core integration module. I'm not sure what I want to do about the listener functionality--I'd like to make it generic, but I'm not sure the behavior needed would be the save across all projects. Any suggestions on how to minimize the project specific code for webflow stuff would be appreciated.

        Show
        Tom Schneider added a comment - Here is the example I promised. (It took much longer than I thought it would.) It requires spring 2.0 and spring webflow 1.0. I tested it against struts 2.0.1 version of the integration since the latest 2.0.2 snapshot of struts wasn't building for me. (I'll see if 2.0.2 snapshot is working on Monday) The example is a simple 2 screen car insurance rating app. The first screen asks the user to enter their age. The next screen will figure out the car insurance rate for the user. (hint: all I do is multiply their age by 2) The FlowScopeInterceptor and the SessionFlowExecKeyInterceptor could probably be made generic and moved into the core integration module. I'm not sure what I want to do about the listener functionality--I'd like to make it generic, but I'm not sure the behavior needed would be the save across all projects. Any suggestions on how to minimize the project specific code for webflow stuff would be appreciated.
        Hide
        Tom Schneider added a comment -

        Not a problem. I'll make that priority this weekend.

        Show
        Tom Schneider added a comment - Not a problem. I'll make that priority this weekend.
        Hide
        Don Brown added a comment -

        If we add this plugin, we'll need a showcase example for testing and, well, to show it off.

        Show
        Don Brown added a comment - If we add this plugin, we'll need a showcase example for testing and, well, to show it off.
        Hide
        Tom Schneider added a comment -

        Thanks for giving this a try. Don't feel bad about not being able to update it--it took me a few hours to figure out how to get it to work in the updated version of xwork. (They moved quite a bit of stuff around on me) I've updated it to work with the latest 2.0.2-SNAPSHOT code as of yesterday.

        **DISCLAIMER***
        I have not tested this at all. (We're still on webwork and won't be moving over to struts2 for a while, but I want this in place when we do move) I would appreciate any testing effort provided. Also, if you run into issues or have any questions, feel free to contact me via email.

        Show
        Tom Schneider added a comment - Thanks for giving this a try. Don't feel bad about not being able to update it--it took me a few hours to figure out how to get it to work in the updated version of xwork. (They moved quite a bit of stuff around on me) I've updated it to work with the latest 2.0.2-SNAPSHOT code as of yesterday. ** DISCLAIMER *** I have not tested this at all. (We're still on webwork and won't be moving over to struts2 for a while, but I want this in place when we do move) I would appreciate any testing effort provided. Also, if you run into issues or have any questions, feel free to contact me via email.
        Tom Schneider made changes -
        Attachment spring-webflow-2.0.2-SNAPSHOT.zip [ 13278 ]
        Hide
        Paul Boonyarungsrit added a comment -

        Tom,
        I tried changing the pom.xml to use struts2-plugins 2.0.2-SNAPSHOT parent and depend on xwork 2.0-beta-3, which are the latest versions to date, however it fails to compile.

        org.apache.struts2.webflow.WebworkFlowAdapter class seems to be calling XWork's ActionProxy.getConfiguration() method, which was removed from XWork 2.0 beta.

        Configuration config = invocation.getProxy().getConfiguration();

        I'm quite new to XWork and SWF, so I might leave this for someone else to fix (if it's a bug).

        Can't wait to use Struts 2 with Spring Webflow!

        Show
        Paul Boonyarungsrit added a comment - Tom, I tried changing the pom.xml to use struts2-plugins 2.0.2-SNAPSHOT parent and depend on xwork 2.0-beta-3, which are the latest versions to date, however it fails to compile. org.apache.struts2.webflow.WebworkFlowAdapter class seems to be calling XWork's ActionProxy.getConfiguration() method, which was removed from XWork 2.0 beta. Configuration config = invocation.getProxy().getConfiguration(); I'm quite new to XWork and SWF, so I might leave this for someone else to fix (if it's a bug). Can't wait to use Struts 2 with Spring Webflow!
        Ted Husted made changes -
        Fix Version/s Future [ 21530 ]
        Tom Schneider made changes -
        Field Original Value New Value
        Attachment struts2-spring-webflow.zip [ 13263 ]
        Hide
        Tom Schneider added a comment -

        This is just a straight conversion from the webwork stuff. I'll try to put together an example just to make sure everything is working as expected. I was really hoping I could get some ideas on how to integrate struts2 and webflow a little better better. Right now the binding between flowscope data and webwork actions is kind of clusmy. I'd be happy to implement any suggestions that anyone has.

        Show
        Tom Schneider added a comment - This is just a straight conversion from the webwork stuff. I'll try to put together an example just to make sure everything is working as expected. I was really hoping I could get some ideas on how to integrate struts2 and webflow a little better better. Right now the binding between flowscope data and webwork actions is kind of clusmy. I'd be happy to implement any suggestions that anyone has.
        Hide
        Don Brown added a comment -

        I think a SWF plugin is a great idea, however, I don't have the time to code the plugin myself. If anyone puts out a patch, I'll apply it.

        Show
        Don Brown added a comment - I think a SWF plugin is a great idea, however, I don't have the time to code the plugin myself. If anyone puts out a patch, I'll apply it.
        Tom Schneider created issue -

          People

          • Assignee:
            Tom Schneider
            Reporter:
            Tom Schneider
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development