Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Name

Spring Webflow Plugin

AuthorPublisher

Tom SchneiderImage Added

License

Open Source (ASL2)

Homepage

http://code.google.com/p/struts2webflow/

Version

1.0.0-beta13 Production

Compatibility

Struts 2.0.26+

State

Unstable

License

Open Source (ASL2)

Homepage

http://code.google.com/p/struts2webflow/

Download

http://code.google.com/p/struts2webflow/downloads/list

{rate:title=Rating|theme=dynamic}

Overview

This The Spring Webflow plugin INLINE

Excerptintegrates Spring Webflow (SWF) with Struts2Struts 2

...

Features

  • Allows struts2 Struts 2 to execute spring webflows
  • Allows struts2 Struts 2 actions to be invoked by spring webflow.
  • Includes an interceptor that injects flow scope properties into struts2 Struts 2 actions.
  • Includes an annotation-based interceptor that injects flow scope properties into struts2 Struts 2 actions.
  • SWF flow execution key can be managed in the session rather than as a hidden field on the client.

...

  • Spring 2.0+
  • Spring Webflow 1.0+
  • Struts 2.0.26+
  • Struts2Webflow 1.0.03+

Installation

See http://code.google.com/p/struts2plugin-maven-repo/ if you use maven.

For non-maven users, this This plugin can be installed by copying the plugin jar into your application's /WEB-INF/lib directory.

...

Step 1 - Create your flow definition xml

...

Step 2 - Configure Spring's applicationContext.xml

...

The Struts2FlowAdapter allows a struts2 Struts 2 action to execute a webflow action-state. The Struts2FlowAdapter uses the id of the action state as the name of Struts 2 action to execute. The alwaysRedirectOnPause is disabled because whether to redirect or not is easier to control in the struts2 Struts 2 configuration files.

Step 3 - Add SWF interceptors to

...

Struts's struts.xml configuration file

...

...

The SessionFlowExecKeyInterceptor puts the flow execution key in the session rather than having it as a hidden field on the form that submitted back. The AnnotationFlowScopeInterceptor uses annotations to bind struts2 Struts 2 action variables to and from flow scope. Before an action executes, this interceptor looks for @FlowIn annotated properties of the struts2 Struts 2 action and populates the these actions from flow scope. After the action has executed, properties annotated with the @FlowOut annotation are put back into flow scope.

Step 4 - Configure the FlowAction so Spring Webflows can be executed

...

...

For each view-state defined in the flow xml definition, there should be a corresponding result entry in the FlowAction definition. (Or a global result for that view-state)

...

The flow can now be launched by accessing the FlowAction.

Version History

...

Version

...

Date

...

Author

...

Notes

...

.

...

Jan 4, 2007

...

Tom Schneider

...