How to display the content of Spring Webflow's "flowScope" in a JSP?
I'd like to list out everything that's in the various webflow context
scopes (viewScope, flowScope, etc) on my JSP pages for debugging purposes
(first webflow app, trying to get it working.) But I can't seem to get the
syntax right. Can anyone tell me how to do this? I have this in my
flow.xml:
<view-state id="createAccount" model="account">
<on-render>
<evaluate expression="flowService.createAccount()"
result="flowScope.account" />
</on-render>
<transition on="next" to="applicationInfo" />
</view-state>
and I have this in my JSP page:
<c:forEach items="${flowScope}" var="thisFlowScope"
varStatus="thisFlowScopeStatus">
<label>${thisFlowScope.key}</label>
<span>${thisFlowScope.value}</span>
</c:forEach>
What I was hoping to see was the "account" attribute/variable printed out
along with everything else in the flowScope. Instead I get nothing. I have
tried various permutations such as "flowRequestContext" instead of
"flowScope". With "flowRequestContext" I get:
javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied
"items" in <forEach>
org.apache.taglibs.standard.tag.common.core.ForEachSupport.toForEachIterator(ForEachSupport.java:255)
org.apache.taglibs.standard.tag.common.core.ForEachSupport.supportedTypeForEachIterator(ForEachSupport.java:219)
org.apache.taglibs.standard.tag.common.core.ForEachSupport.prepare(ForEachSupport.java:137)
javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:227)
Can anyone tell me how to do this?
No comments:
Post a Comment