Thanks for the response. Here is some code to give you a better idea of where I stand (I've replaces some logic with comments to shorten it for this purpose)
And Yes I am using a Spring MVC Controller
The Controller
Code:
public class MyController implements Controller {
// Some private members here..
@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse reponse) throws Exception {
String strURL;
// Some Setup here to figure out URL and some other stuff
ModelAndView modelAndView = new ModelAndView(new InternalResourceView(strURL));
// Add some objects to te modelAndView...
// modelAndView.addObject("someBean", someBean);
return modelAndView;
}
// Some Properties...
}
The Web Flow
Code:
<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<on-start>
<!-- Some Startup -->
</on-start>
<!-- Some <action-state> tags here -->
<!-- I want to end up here after post on the view loaded by my controller.... -->
<view-state id="getName" view="/WEB-INF/authz/${domainContext.getBranding()}/getName.xhtml" model = "getNameBean">
<!-- Some on-render stuff -->
<!-- some possible transitions (these would ultimately go to other view-states depending on user input -->
</view-state>
<!-- I'd eventually end up here -->
<end-state id="someEndState" view="theEnd.xhtml" />
</flow>
web-mvcconfig.xml
Code:
<!-- Maps request URIs to controllers -->
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/forgotPassword.htm=myController
<!-- There are a bunch of these which use different controllers -->
<!-- I also have a flowController (as defined below) which I use for the Spring flows -->
/SomePageFlow.htm=flowController
/SomeOtherFlow.htm=flowController
</value>
</property>
<property name="defaultHandler">
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
</property>
</bean>
<bean id="myController" class="com.mypackage.controller.MyController">
<!-- Set Some properties -->
</bean>
<!-- Handles requests mapped to the Spring Web Flow system -->
<bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
As I'm typing this post out what I'm thinking I actually need to do is after a post on view loaded by MyController... simply redirect to another url which is mapped to the flow I want to go to...
Does that make sense?
The problem I'm having though is that on post back my controller is not executing again so I can handle it this way...
Please advise if you see something wrong or if the code I have submitted is not sufficient.