Is there a way of using spring MVC contollers as subflows in spring webflow?
I have some data browsers written as plain MVC controllers and I would like to use them in my flows to browse/select data.
Is there a way of using spring MVC contollers as subflows in spring webflow?
I have some data browsers written as plain MVC controllers and I would like to use them in my flows to browse/select data.
I managed to solve my problem. I am using a view state pointing to an external url (my controller). Here is the example:
<view-state id="itemBrowser" view="externalRedirect:contextRelative:/itemBrowser?callbackUrl=#{flowExecutionUrl}&itemSelectionMode=true">
<transition on="itemSelected" to="wizardStepBasic">
<evaluate expression="wizardActions.onItemSelected"/>
</transition>
</view-state>
The 'callbackUrl' parameter is used at the controller side to return to the flow. For example:
<a href=${callbackUrl}&selectedItemId=${item.id}&_eventId_itemSelected>
<img src="static/images/accept.png"/>
</a>
Hope, it'll be of some help to somebody :-)