Spring Webflow, return to main stream from any subflow

I am trying to return to the main thread in spring, from any of my ceilings, simply by clicking a button.

when I use <end-state>, it just goes to the previous thread, which is also a sub-stream in the application.

Any ideas?

+5
source share
2 answers

You just need the appropriate transitions in each state of the subflow in the calling thread to do what you want. The final state identifier in your substream is what will be used as the identifier of the event that you can jump into your call flow.

. , , . return ( id - , ).

, . , , . , , .

, , :

<end-state id="back"/>

, :

<subflow-state id="do-some-sub" flow="some-sub">
    < ... input variables, expressions, etc ... />
    <transition on="back" to="some-state"/>
</subflow-state>

, - . , , , , , . , , - , ( "" ).

+13

, "parent",

<flow parent="login" xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow  http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

<view-state id="forgotPassword">
        <transition on="backtoLogin" to="login">

        </transition>

, 'click'.

, .xml

my parent ie login-flow.xml

<flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow     http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">


<view-state id="login" view="../login/defaultLogin.xhtml">
0

All Articles