View Full Version : accessing to command object
May 25th, 2005, 07:59 AM
I need have reference to command object from other place. I use DWR technology and I only have references to request session and spring context. But how can I get access to my command object created in flow action?
May 25th, 2005, 12:44 PM
If you're using the default HttpSessionFlowExecutionStorage, the FlowExecutions are actually stored in the HttpSession, so if you can get hold of the flow execution id (e.g. from the request), you could do something like this:
FlowExecution flowExecution=(FlowExecution)WebUtils.getRequiredS essionAttribute(request, flowExecutionId);
Event event=new ServletEvent(request, response);
RequestContext context=new StateContextImpl(event, flowExecution);
FormObjectAccessor accessor=new FormObjectAccessor(context);
Object myFormObject=accessor.getFormObject("myFormObject", ScopeType.FLOW);
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.