Search code examples
javaspringspring-webflowspring-webflow-2

Subflow popup does not allow render fragments when returning to parent flow view-state


I have a sub-flow that is being shown in a popup. When the popup is closed, due to clicking a submit or cancel button, transitioning back to the view-state of the main flow causes a full page reload. The problem is that my underlying parent-flow page contains a file chooser control that loses the user selection when the page is refreshed. In order to retain the inputted data, I would like to update a fragment of the parent-flow's page the way that I can when transitioning between view-states of the same flow.

Here is my flow xml:

Main Flow:

<view-state id="main">
    <transition on="start" to="child-flow"/>
    <transition on="finish" to="finished"/>
</view-state>

<subflow-state id="child-flow" subflow="main/childFlow">
    <transition on="submitted" to="main">
        <render fragments="popupClosed" />
    </transition>
</subflow-state>

<end-state id="finished" />

Child Flow:

<view-state id="childFlow" view="main/childFlow" popup="true">
    <transition on="submit" to="popupClosed" />
    <transition on="cancel" to="popupClosed" />
</view-state>

<end-state id="popupClosed" />

I'm using Spring WebFlow v2.0.8 with Tiles and JSPs.

Thanks, Steph


Solution

  • if you want javascript type pop up/modal functionality dont use the 'popup' attribute implement it like this.

    How to include a pop-up dialog box in subflow