|
#1
|
|||
|
|||
|
This thread discusses the "Accessing a flow execution from outside Spring Web Flow" tip published on the Ervacon Spring Web Flow Portal.
Read the tip at http://www.ervacon.com/products/swf/tips/tip1.html |
|
#2
|
|||
|
|||
|
The code helped me a lot! Thanks a bunch to the author! The only change I made for my use, was to inject the formController instead of getting the ApplicationContext (which I already had, because I extended AbstractController) and then obtaining the formController via getBean().
I'm just wondering if such a common requirement (accessing flow data outside a flow) should require so much custom code in my application. A static method provided by SWF would be a really nice improvement for 1.0.1 :-) Something like - FlowExecution flowExecution = FlowExecutionHolder.getFlowExecution(request, flowExecutionKey); Best Oliver |
|
#3
|
|||
|
|||
|
Quote:
I'll discuss this with Keith to see what our policy is going to be. Erwin |
|
#4
|
|||
|
|||
|
I do something like this to instead of reading the flowScope , modify it... but seems like is not really working.. any ideas?
if (handler.isFlowExecutionKeyPresent(externalContext )) { try { ExternalContextHolder.setExternalContext(externalC ontext); FlowExecutionKey flowExecutionKey = flowE.parseFlowExecutionKey(handler.extractFlowExe cutionKey(externalContext)); FlowExecution flowExecution = flowE.getFlowExecution(flowExecutionKey); MutableAttributeMap flowScope = flowExecution.getActiveSession().getScope(); if(flowScope.get("VALUETOMODIFY").toString() != null){ flowScope.put("VALUETOMODIFY","New Data"; chain.doFilter(request, response); return; } catch (Exception e) { e.printStackTrace(); } finally { ExternalContextHolder.setExternalContext(null); } } regards... |
|
#5
|
|||
|
|||
|
Modifying a flow execution from outside SWF, and hence outside the flow execution, is not really a supported use-case.
It's not impossible but it will be quite a bit of custom coding: after getting the flow execution you'll have to save it again using the flow execution repo in use. Erwin |
|
#6
|
|||
|
|||
|
Hi people,
I wondering if anyone had tried integrating the following architecture for their web applications: Ext-js - Screen Design and validation DWR - Data loading mechanism Spring webflow - form handling and screen flow Presently, I am trying to integrate these three products together. Really enjoy what Ext-JS has to provide in terms of validation, screen designs and their functionalities. However, I am having a problem in displaying the form data pass over by Spring webflow using Ext-Js. There are two way of approach which i will wan to explore: 1. I will like to access the flow execution outside of SWF. However, I will need the request to be pass in using DWR. Hence not very sure of how to go about it therefore i currently trying the 2nd approach which is not working 2. As Spring Webflow is using JSTL to display the form data on the JSPs, however by using Ext-JS we are using javascript to load the form elements and data. Example: Spring webflow samples app display the passed over form data like this: <input type="text" id="myID" value="<c:out value="{$env.ID}"/>"/> Hence, I tried using the following method in ext-js (which did not work): var myIDTextField = new Ext.form.TextField({ id:'myID', inputType:'text', width:100, label:'ID', value:'<c:out value="{$env.ID}"/>' }); Hence, I am facing such a problem as describe above over there. Hope tat you guys can lend me a hand here.... thanks so much!!! Jessica |
|
#7
|
|||
|
|||
|
klr8
thanks for this solution, well i am not an expert in SWF, only i have the enough knowledge to work happy with SWF ![]() about this Quote:
can you share some situations ??? hi jessica1983 Quote:
Quote:
empty field? or some other message error from the server? thanks for advanced
__________________
- Manuel Jordan Kill Your Pride, Share Your Knowledge With All The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7 Use [ c o d e ] [ / c o d e ] tags Blog Technical Reviewer of Apress
|
|
#8
|
|||
|
|||
|
Hi there!!!
thanks for much for your prompt reply / help. - I will like to use DWR to display the form data - However, the form data is stored in the flow execution (SWF). From how I understand it, DWR is a request-on-demand approach. Therefore, DWR cannot be triggered using SWF flow execution. Hence, after looking through the thread over there - "Accessing a flow execution from outside of Spring Web Flow" i thought that maybe it is possible to trigger DWR from javascript where DWR bean will access the flowexecutionkey / request. The problem is, I am not so sure how to go about it in terms of configuration and getting the flowexecutionkey / request / session. I tried the example given in the thread but it seems like I had to throw in the flowexecutionkey / session / request in order to access the form data in Spring webflow. Hence I really need some help here... I really like to thank you for your help. Many Thanks, Jessica |
|
#9
|
||||
|
||||
|
Dear jessica
Quote:
![]() Quote:
Quote:
Quote:
regards
__________________
- Manuel Jordan Kill Your Pride, Share Your Knowledge With All The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7 Use [ c o d e ] [ / c o d e ] tags Blog Technical Reviewer of Apress
|
|
#10
|
|||
|
|||
|
Hi.
I want to implement the XT Ajax FormDataAccesor in order to submit a form using xt ajax and actualy handle the data in the SWF. I'm using JspComponent to render the response. Anyway, this implementation needs to extract the command object and the validation errors from the flow execution. How can I do this? I can extend the FormAction and expose the form errors and command object which are protected. Or I can copy/paste retrieval logic from the FormObjectAccessor class. Is there someone that did this and can help me with a simpler/cleaner solution? Thank you. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|