This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

When this form is submitted a MultiAction is called and I expected the request parameter formatted to be in the RequestScope, but there is no such parameter(the RequestScope is empty).

I can get the paramter with this code:

Code:

context.getSourceEvent&#40;&#41;.getParamter&#40;"formatted"&#41;;

but why do I need the RequestScope then?
Ok, I can store data in it to display them in a ViewAction that follows my MultiAction. But why doesn't it work the other way round? Have I done something wrong? Do I have to use a FormObject everytime I want to get RequestParameters from the RequestScope (Even If I only have an url encoded link with additional parameters)? And what's about the RequestContext.getModel() method. Again an additional way to store request data? I think I've understood what the FlowScope is all about, but I'am a little confused with the way SWF uses the RequestScope.

In a HTTP environment, we treat the HttpServletRequest as a source event parameter source. Think about it -- something happens -- e.g. the user presses the submit button. Along with that event, come contextual data about what happened e.g the form field values they typed in. We treat that data consistently as event parameters.

Now request scope is a context for data that exists after a request into the webflow system is triggered (by the occurence of an external event). So actions can put stuff in request scope for reference, for example, and anything in request scope automatically gets exposed in the view model for purposes of rendering. Data in request scope only lives for the life of a single request into the webflow system.