>>Which method is called on an action bean when no method name is
>>specified in the action tag?
>
> http://www.springframework.org/docs/webflow-pr1-api/org/springframework/web/flow/action/MultiAction.html
>
> The default method name called in a MultiAction is the id of the current
> ActionState.
>
> Then again, that JavaDoc page doesn't seem to explicitly mention the use
> of the <action> tag's "name" attribute. Is that a documentation
> oversight, or is that something that is being phased out in favor of this
> form:
>
> <action-state id="searchState">
> <action bean="my.search.action">
> <property name="executeMethodName" value="search"/>
> </action>
> <transition on="success" to="results"/>
> </action-state>
That's an oversight. I'll update the documentation, wich should go up in a
few hours when preview2 is released.
> While I'm here, I'll ask the question that I've been bumping against. Is
> there a default way to access flow-scoped attributes in a JSP (or other
> view), or must one always copy them into request scope in the web flow? I
> can live with the latter, but it took me a few brain cycles to accept
> that; I had some unfounded expectation that I'd be able to get things out
> of flowscope more directly.
Actually, the request scope and flow scope are merged together and exposed
as a single model map to the view (look at InternalRequestScope.getModel()).
So if you have "foo" in request scope and "bar" in flow scope, the JSP sees
them all as just being part of the model:
<%=request.getAttribute("foo") %>
<%=request.getAttribute("bar") %>
<c:out value="${foo}"/>
<c:out value="${bar}"/>
Erwin
|