spring-webflow-2

How can I access Spring Webflow FlowScope elements outside the flow?

天涯浪子 提交于 2019-11-30 21:14:00
EDIT: I didn't get any bites on this question, so I'm adding a little more detail. I have a Spring Webflow app (ver 2.3.2). I need to access multiple FlowScope objects from inside the validation of one of the steps (not inside the flow itself). You would think this would be simple, but I haven't been able to crack it. Spring Webflow provides a series of special EL variables which can be used for accessing the various scopes, but only inside the flow itself. Inside a custom Spring validator, there doesn't seem to be any way to get to them: @Component public class MyObjectValidator { @Autowired

How can I access Spring Webflow FlowScope elements outside the flow?

ぃ、小莉子 提交于 2019-11-30 05:31:04
问题 EDIT: I didn't get any bites on this question, so I'm adding a little more detail. I have a Spring Webflow app (ver 2.3.2). I need to access multiple FlowScope objects from inside the validation of one of the steps (not inside the flow itself). You would think this would be simple, but I haven't been able to crack it. Spring Webflow provides a series of special EL variables which can be used for accessing the various scopes, but only inside the flow itself. Inside a custom Spring validator,

Spring webflow - how to pass the session in evaluate expression?

别等时光非礼了梦想. 提交于 2019-11-29 15:29:35
I'm using spring webflow, but I need to access my HttpSession in a method that's accessed using a transition ==> evaluate expression. (so in the xml file containing my flow) So far I've yet to find a way to actually pass it to my method. I've taken a look at the flowrequestcontext but so far I haven't found a way yet. I think you don't need to pass it as soon as you pass the RequestContext. You can try this: public class MyAction extends MultiAction{ public Event myMethod(RequestContext context){ HttpSession session = ((HttpServletRequest)context.getExternalContext().getNativeRequest())

Spring webflow - how to pass the session in evaluate expression?

旧时模样 提交于 2019-11-28 08:51:34
问题 I'm using spring webflow, but I need to access my HttpSession in a method that's accessed using a transition ==> evaluate expression. (so in the xml file containing my flow) So far I've yet to find a way to actually pass it to my method. I've taken a look at the flowrequestcontext but so far I haven't found a way yet. 回答1: I think you don't need to pass it as soon as you pass the RequestContext. You can try this: public class MyAction extends MultiAction{ public Event myMethod(RequestContext

Web flow add model attribute for binding with form values

試著忘記壹切 提交于 2019-11-28 05:48:15
问题 I'm new to web flow, so I'm not sure how to do this: I have a spring mvc controller, and I have a spring webflow. One of the flow states is supposed to display a form for adding a new client. In the controller I have methods for saving the Client object (binded to the form as modelAttribute = "client") to the database. I don't know how to pass the control from the webflow to the controller and back or create a model Attribute directly in the flow for binding with the form (but as I understand