jsfflow-scope

Simple-flow example from the Java EE7 tutorial remembers values of previous flow


I'm just playing around with the simple-flow example from the Java EE7 tutorial and stumble on a problem.

Documentation: Java EE7 tutorial - Simple Flow

Example: tut-install/examples/web/jsf/simple-flow/

I'm puzzled, because the flow remembers the data in the FlowScope after the return page.

Example code from the manual:

src/main/webapp
    index.xhtml
    simple-flow-return.xhtml
    WEB_INF/
        web.xml
    simple-flow
        simple-flow-flow.xml
        simple-flow.xhtml
        simple-flow-page2.xhtml

Demo:

Enter flow
--> Value = test
--> Second Page - Value: test
--> Return
--> Value (should be empty): "" --> Correct!
--> Back to start
--> enter flow
--> Value: test (THIS VALUE IS REMEMBERED AND ALREADY FILLED IN!)

Why is this value remembered? I left to the return page and the value was empty, but now again remembered!

Has anybody the same problem with this example? (Tested on GlassFish and WildFly)


Solution

  • We made some progress: Use the simple-flow example, from the tutorial, but with a Managed bean.