Back Forum Reply New

Redirecting to another flow

Hey Guys,

I am using the folowing code

Code:
RequestContext requestContext = RequestContextHolder.getRequestContext();
String path = requestContext.getExternalContext().getContextPath();
//requestContext.getExternalContext().requestExternalRedirect(quot;/codeType?params=seqId=50quot;);
MutableAttributeMap map = new LocalAttributeMap();
map.put(quot;paramsquot;, quot;seqId=50quot;);
requestContext.getExternalContext().requestFlowDefinitionRedirect(quot;codeTypequot;, map);
to redirect my existing flow to a new flow from the action listener. The flow is being called but the xhtml does not get rendered. The view still remains the old one. Is there a way i can force the redirected flow to be displayed in a frame?

Please advice.
Thank you,
Aragonknight

could you provide some more info, about your flow and configs? please put them in code - php tags.

Soryy for the delay in response. Here arre more details on this. I have a chart which when cllicked on a datapoint enters a datapointListener, where in i get the link associated to that datapoint from my code and want to direct the flow to this new flow ucl.

Here is how the DataPointListener looks like HP Code:
publicnbsp;voidnbsp;processDataPoint(DataPointEventnbsp;dataPointEvent){//getnbsp;mynbsp;flownbsp;uclnbsp;basednbsp;onnbsp;thenbsp;DataPointnbsp;andnbsp;redirectnbsp;tonbsp;thisnbsp;flownbsp;fromnbsp;here.}nbsp;

Please let me know if you need any specific code or configurations.

Thank you

Hello,

Could you please take a look at my requirement if you get a chance to look at it?Thank you

If you request help, please provide more info as I already mentioned. This allows the community to understand your problem (could be typo or so).
So to start with please post your flow definition and your views and beans. Further which version of spring, spring-webflow? (ideally an attachment to easily reproduce your issue)

Thank you For responding.

Here is what I got. A dataPointListener( ActionListener) which is invoked from a chart tag. Which when invoked collects data for that point clicked which i need to use to redirect to a new flow with the collected attributes as input to the flow.

Attached is the code for the actionListener. I have also marked the point where i need to redirect to a new folw in a red comment.

Please let me know if you need any further information.

Thank you for your time.

So to start with please post your flow definition and
your views and beans.
Further which version of spring, spring-webflow? (ideally an attachment to easily reproduce your issue)

could you provide this info as well?

And why would you put your processing logic in an actionListener? Why not a tag that return a String a action event
PHP Code:
nbsp;lt;h:commandButtonnbsp;action="foo"nbsp;.../gtHP Code:
lt;flownbsp;...gt;lt;varnbsp;name="myFooHandler"nbsp;class="x.y.z.FooHandler"/gt;...lt;view-statenbsp;id="..."nbsp;...gt;...lt;transitionnbsp;on="foo"nbsp;to="result"gt;lt;evaluatenbsp;expression="myFooHandler.getMyCollectionOfBars()"nbsp;result="flowScope.bars"/gt;lt;/transitiongt;lt;/view-stategt;lt;view-statenbsp;id="result"nbsp;...gt;lt;/view-stategt;lt;/flowgt;

Are you using a custom tag?

I am using this tag from Infragistics called Ig:Chart which has only one action Listener (dataPointListener).HTML Code:
lt;ig:chart id=quot;chartRenderer1quot; binding=quot;#{adHocQueryExecutionBean.chartRenderer1}quot;  style=quot;height:70%; width:70%quot; dataPointListener=quot;#{adHocQueryExecutionBean.processDataPoint}quot;gt;
lt;/ig:chartgt;
so when the control enters the DatapointListener i want to forward the control to a different flow based on the DataPoint received in the ProcessDataPoint method.

Please let me know if you need any further information.

Thank you,
Santhosh.

webflow version 2.0-m2 sprin...ing-faces.html suggest

PHP Code:
publicnbsp;voidnbsp;myActionListener(ActionEventnbsp;event)nbsp;{nbsp;//nbsp;Executenbsp;anynbsp;requirednbsp;processingnbsp;andnbsp;thennbsp;forwardnbsp;tonbsp;thenbsp;flownbsp;executionnbsp;facesContext.getCurrentInstance().getExternalContext().dispatch("/spring/main/");facesContext.getCurrentInstance().responseComplete();}nbsp;

PHP Code:
ExternalContextnbsp;externalContextnbsp;=nbsp;FacesContext.getCurrentInstance().getExternalContext();externalContext.redirect(externalContext.getRequestContextPath()nbsp;+nbsp;"/spring/yourflow");//nbsp;nownbsp;wenbsp;cannbsp;marknbsp;thenbsp;responsenbsp;asnbsp;completedcontext.responseComplete();
refer to end of page thread.jspa?th...67303amp;tstart=0
¥
Back Forum Reply New