Hi! I would like to know if there's a Struts 2 Plugin to use SWF 2 with it. I know about the "Struts 2 Webflow" Plugin, but it's implemented for SWF 1.
I refactored it to the SWF 2 classes and methods but now I'm having a problem I can't solve. SWF 2 always tries to resolve a view-state using a FlowViewResolver, which tries to find .jsp files with the view-state name. I tried building a "Struts2ViewResolver". I'm not that familiar with SWF 2 internals so you're right to assume I had no success with that too :P
Could someone help me to refactor the "Struts 2 Webflow" plugin to SWF 2 or point me a Struts 2 Plugin that already do that?
BTW, I know pretty much nothing about Spring MVC and I don't know much about SWF too. I'm developing a Framework for web applications which uses Struts 2 as controller and must have a Webflow feature (it's its key feature). As soon as I implement this (Struts2+SWF2) I'll start playing around and learning about SWF =P
Struts 2 Webflow Plugin page: http://cwiki.apache.org/S2PLUGINS/sp...ow-plugin.html
A little overview how this plugin works (or should work):
I make a Struts 2 mapping for my flow, like this:
<action name="exampleFlow" class="com.googlecode.struts2webflow.FlowAction">
And a SWF 2 mapping like this:
And, to make things short, what the plugin does is "translate" SWF view-states into Struts 2 Action's Results. Got it?
<!-- Content of the /WEB-INF/flows/swfExampleFlow.xml file -->
<flow all-that-stuff-here="is hidden">
<var name="ex" class="example.flow.ExampleFlow" />
<view-state id="flowStart" view="s2_viewInput">
<transition on="submit" to="someFlowAction" />
<evaluate expression="flowScope.ex.magic()" result="res" />
<transition on="OK" to="flowEnd" />
<transition on="ERROR" to="flowStart" />
<end-state id="flowEnd" view="s2_showResult" />
(Sorry if I'm using wrong terminology for things... please correct me if I am).
Thanks for any help :)