[JAVASERVERFACES_SPEC_PUBLIC-730] Make flows reusable Created: 22/Jan/10  Updated: 16/Mar/13  Resolved: 16/Mar/13

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Navigation
Affects Version/s: 2.0
Fix Version/s: 2.2 Sprint 12

Type: New Feature Priority: Minor
Reporter: Ed Burns Assignee: Ed Burns
Resolution: Fixed Votes: 6
Labels: None
Σ Remaining Estimate: 1 week, 2 days, 5 hours, 29 minutes Remaining Estimate: 1 week, 2 days, 5 hours, 29 minutes
Σ Time Spent: 5 days, 18 hours, 31 minutes Time Spent: 5 days, 18 hours, 31 minutes
Σ Original Estimate: 2 weeks, 1 day Original Estimate: 2 weeks, 1 day
Environment:

Operating System: All
Platform: All
URL: http://java.sys-con.com/node/535314?page=0,2


Attachments: Text File 20120330-1155-i_spec_730.patch     Text File 20120406-1700-i_spec_730.patch     Text File 20120412-1618-i_spec_730.patch     Text File 20120413-1638-i_spec_730.patch     Text File 20120417-1320-i_spec_730.patch     Zip Archive 20120417-1331-i_spec_730-mods.zip     Text File 20120419-2328-i_spec_730.patch     Text File 20120425-1225-i_spec_730_changebundle.txt     Text File 20120426-0008-i_spec_730.patch     Text File 20120427-0045-i_spec_730.patch     Text File 20120427-1511-i_spec_730.patch     Zip Archive 20120628-i_spec_730.zip     Zip Archive 20120628-i_spec_730.zip     Zip Archive 20120702-1417-i_spec_730-FDL_IN_WEB_INF.zip     Text File 20120705-1641-i_spec_730-flow-in-jar.patch     Text File 20120725-1818-i_spec_730.patch     Text File 20120821-2251-i_spec_730.patch     Text File 20120830-1313-i_spec_730.patch     Text File 20120914-1624-i_spec_730.patch     Text File 20120917-1855-i_spec_730.patch     Text File 20121005-2221-i_spec_730.patch     Text File 20121009-2345-i_spec_730.patch     Text File 20121011-0039-i_spec_730.patch     Text File 20121013-0012-i_spec_730.patch     Zip Archive 20121128-1054-GMT-5-task-flow-moderate.zip     Zip Archive basic-explicit.zip    
Issue Links:
Dependency
depends on JAVASERVERFACES-2677 XSD Tweaks from ADF team Closed
depends on JAVASERVERFACES-2402 Hook up FlowHandlerFactory to actuall... Closed
depends on JAVASERVERFACES_SPEC_PUBLIC-949 Window-id Closed
blocks JAVASERVERFACES-2580 Implement the XML portion of FacesFlo... Closed
blocks JAVASERVERFACES-2581 Implement entierty of FlowBuilder imp... Closed
blocks JAVASERVERFACES_SPEC_PUBLIC-1165 Leverage the default "value" attribut... Closed
blocks JAVASERVERFACES-2510 Implement Faces Flows Closed
Duplicate
is duplicated by JAVASERVERFACES_SPEC_PUBLIC-1118 Provide a switch case sort of thing t... Closed
is duplicated by JAVASERVERFACES_SPEC_PUBLIC-532 Support for modular, reusable, fragme... Closed
Related
is related to JAVASERVERFACES_SPEC_PUBLIC-533 Externalization of application metadata Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVASERVERFACES_SPEC_PUBLIC-977 Type-safe view config and navigation Sub-task Closed  
JAVASERVERFACES_SPEC_PUBLIC-531 Support for non-page nodes in the nav... Sub-task Closed rogerk  
Issuezilla Id: 730
Status Whiteboard:

size_large importance_medium


 Description   

Although you can use several jsf-config files in a single application, essentially
breaking down your application into smaller flows, it's still too hard to create a flow
that's truly reusable across applications in JSF.
The idea here would be to define standalone flows that can be incorporated into
other flows. And to make things truly reusable, these flows should include a
standalone memory scope and a transaction scope. This will let developers
incorporate the flow into encapsulating flows without interfering with the
transaction and memory scope of the encapsulating flow.



 Comments   
Comment by Ed Burns [ 22/Jan/10 ]

Definately not 2.0 Rev a

Comment by Ed Burns [ 08/Jun/10 ]

At JAX recently, someone mentioned that there were a lot of good ideas in SpringWebFlow that have not yet
made their way into JSF 2.0. I'm going to ask Jeremy Grelle to jot down some thoughts on this topic as
comments on this issue.

Comment by Ed Burns [ 22/Jun/10 ]

I just spoke to Keith Donald on the phone and requested he fill in some notes here if he felt it necessary
and beneficial.

Comment by Ed Burns [ 22/Jun/10 ]

rogerk

Comment by rogerk [ 27/Oct/10 ]

triage

Comment by rogerk [ 16/Nov/10 ]

triage

Comment by kito75 [ 20/Apr/11 ]

Related issues:

Support for modular, reusable, fragments of a web application http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-532
Simplify external view loading requirements http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-809
Plugin System http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-970

Comment by andy_bosch [ 13/Jul/11 ]

I used Spring Webflow quite a lot in my last projects. As most of the projects where in a Portal environment, we had to struggle with the SWF integration. To be honest, using JSF + SWF in a Portlet is a pain.
IMHO it is very important to define a solutions which is usable in a Portal environment as well.

Comment by Ed Burns [ 27/Mar/12 ]

Snapshot

Comment by Ed Burns [ 29/Mar/12 ]

New style testcase

Comment by Ed Burns [ 29/Mar/12 ]

Sending common/ant/common.xml
Sending common/ant/dependencies.xml
Adding jsf-api/src/main/java/javax/faces/application/FlowScoped.java
Sending jsf-ri/build.xml
Adding jsf-ri/conf/share/javax.enterprise.inject.spi.Extension
Sending jsf-ri/mojarra-jsf-impl.bnd
Adding jsf-ri/src/main/java/com/sun/faces/flow
Adding jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIContext.java
Adding jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIExtension.java
Adding test/agnostic/flow
Adding test/agnostic/flow/basic
Adding test/agnostic/flow/basic/nbactions.xml
Adding test/agnostic/flow/basic/pom.xml
Adding test/agnostic/flow/basic/src
Adding test/agnostic/flow/basic/src/main
Adding test/agnostic/flow/basic/src/main/java
Adding test/agnostic/flow/basic/src/main/java/com
Adding test/agnostic/flow/basic/src/main/java/com/sun
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/VersionBean.java
Adding test/agnostic/flow/basic/src/main/resources
Adding test/agnostic/flow/basic/src/main/webapp
Adding test/agnostic/flow/basic/src/main/webapp/WEB-INF
Adding test/agnostic/flow/basic/src/main/webapp/WEB-INF/web.xml
Adding test/agnostic/flow/basic/src/main/webapp/index.xhtml
Adding test/agnostic/flow/basic/src/main/webapp/start.xhtml
Adding test/agnostic/flow/basic/src/test
Adding test/agnostic/flow/basic/src/test/java
Adding test/agnostic/flow/basic/src/test/java/com
Adding test/agnostic/flow/basic/src/test/java/com/sun
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces/test
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow/basic
Adding test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow/basic/FlowEntryExitIT.java
Adding test/agnostic/flow/pom.xml
Sending test/agnostic/pom.xml
Sending test/pom.xml
Transmitting file data ..................
Committed revision 9786.

SECTION: API Changes
--------------------

A jsf-api/src/main/java/javax/faces/application/FlowScoped.java

  • First API change for flows
  • <p class="changed_added_2_2">Classes with this annotation attached to them
  • will be considered to be in the scope of the named flow. The implementation
  • must provide an implementation of <code>javax.enterprise.inject.spi.Extension</code>
  • that implements the semantics such that beans with this annotation are created
  • when the user enters into the named flow, and de-allocated when the user exits
  • the named flow.</p>

SECTION: Impl Changes
----------------------------

M jsf-ri/mojarra-jsf-impl.bnd

  • OSGi nonsense to allow us to use CDI.

M jsf-ri/build.xml
A jsf-ri/conf/share/javax.enterprise.inject.spi.Extension
A jsf-ri/src/main/java/com/sun/faces/flow
A jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIExtension.java
A jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIContext.java

  • Declare a CDI Portable Extension. See

http://docs.jboss.org/weld/reference/latest/en-US/html/extend.html#d0e4848

M common/ant/dependencies.xml
M common/ant/common.xml

  • Build nonsense to add CDI to our compile time classpath

M test/agnostic/pom.xml
M test/pom.xml
A test/agnostic/flow
A test/agnostic/flow/basic
A test/agnostic/flow/basic/nbactions.xml
A test/agnostic/flow/basic/src
A test/agnostic/flow/basic/src/test
A test/agnostic/flow/basic/src/test/java
A test/agnostic/flow/basic/src/test/java/com
A test/agnostic/flow/basic/src/test/java/com/sun
A test/agnostic/flow/basic/src/test/java/com/sun/faces
A test/agnostic/flow/basic/src/test/java/com/sun/faces/test
A test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic
A test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow
A test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow/basic
A test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow/basic/FlowEntryExitIT.java
A test/agnostic/flow/basic/src/main
A test/agnostic/flow/basic/src/main/java
A test/agnostic/flow/basic/src/main/java/com
A test/agnostic/flow/basic/src/main/java/com/sun
A test/agnostic/flow/basic/src/main/java/com/sun/faces
A test/agnostic/flow/basic/src/main/java/com/sun/faces/test
A test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic
A test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow
A test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic
A test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/VersionBean.java
A test/agnostic/flow/basic/src/main/resources
A test/agnostic/flow/basic/src/main/webapp
A test/agnostic/flow/basic/src/main/webapp/index.xhtml
A test/agnostic/flow/basic/src/main/webapp/WEB-INF
A test/agnostic/flow/basic/src/main/webapp/WEB-INF/web.xml
A test/agnostic/flow/basic/src/main/webapp/start.xhtml
A test/agnostic/flow/basic/pom.xml
A test/agnostic/flow/pom.xml

  • My first Manfred style testcase. It works well. Thanks Manfred.
Comment by Ed Burns [ 30/Mar/12 ]

Snapshot, throws UnsupportedOperationException, as expected.

Comment by Ed Burns [ 03/Apr/12 ]

Another snapshot, can enter and exit a hard-coded flow.

Sending jsf-api/doc/web-facesconfig_2_2.xsd
Sending jsf-api/src/main/java/javax/faces/application/Application.java
Sending jsf-api/src/main/java/javax/faces/application/ApplicationWrapper.java
Deleting jsf-api/src/main/java/javax/faces/application/FlowScoped.java
Adding jsf-api/src/main/java/javax/faces/flow
Adding jsf-api/src/main/java/javax/faces/flow/Flow.java
Adding jsf-api/src/main/java/javax/faces/flow/FlowHandler.java
Adding jsf-api/src/main/java/javax/faces/flow/FlowScoped.java
Sending jsf-ri/build.xml
Deleting jsf-ri/conf/share/javax.enterprise.inject.spi.Extension
Sending jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java
Sending jsf-ri/src/main/java/com/sun/faces/application/ApplicationImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
Sending jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java
Sending jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
Adding jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java
Sending jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIContext.java
Deleting jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIExtension.java
Adding jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/LifecycleFactoryImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/LifecycleImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/util/FacesLogger.java
Sending test/agnostic/flow/basic/pom.xml
Adding test/agnostic/flow/basic/src/main/java/com/acme
Adding test/agnostic/flow/basic/src/main/java/com/acme/FlowCDIExtension.java
Adding test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java
Deleting test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/VersionBean.java
Adding test/agnostic/flow/basic/src/main/resources/META-INF
Adding test/agnostic/flow/basic/src/main/resources/META-INF/persistence.xml
Adding test/agnostic/flow/basic/src/main/resources/META-INF/services
Adding test/agnostic/flow/basic/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Adding test/agnostic/flow/basic/src/main/webapp/WEB-INF/beans.xml
Adding test/agnostic/flow/basic/src/main/webapp/WEB-INF/faces-config.xml
Sending test/agnostic/flow/basic/src/main/webapp/WEB-INF/web.xml
Sending test/agnostic/flow/basic/src/main/webapp/index.xhtml
Adding test/agnostic/flow/basic/src/main/webapp/nonFlow.xhtml
Sending test/agnostic/flow/basic/src/main/webapp/start.xhtml
Sending test/agnostic/flow/basic/src/test/java/com/sun/faces/test/agnostic/flow/basic/FlowEntryExitIT.java
Transmitting file data ...............................
Committed revision 9790.

http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-730

  • First committed iteration of Flow implementation.

SECTION: Spec changes
----------------------------
A + jsf-api/src/main/java/javax/faces/flow/FlowScoped.java
D jsf-api/src/main/java/javax/faces/application/FlowScoped.java

  • This is the first time JSF has required a CDI custom scope. The
    Previous iteration had this in the application package. Move it to
    its own package.

M jsf-api/src/main/java/javax/faces/application/Application.java
M jsf-api/src/main/java/javax/faces/application/ApplicationWrapper.java
A jsf-api/src/main/java/javax/faces/flow/FlowHandler.java

  • Add the flow handler.

M jsf-api/doc/web-facesconfig_2_2.xsd

  • Place-holder syntax for declaring a faces-flow in faces-config.xml.
    This won't be the only way to declare flows, see the proposal.

A jsf-api/src/main/java/javax/faces/flow
A jsf-api/src/main/java/javax/faces/flow/Flow.java

  • Runtime representation of a flow.

M jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
M jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
A jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java

  • Implementation of the XML parsing. Note this important comment, in
    the process() method.

// The flow feature is effectively disabled if no flows are detected
// at startup time. This is accomplished by adding a simple boolean
// property to WebConfiguration that is checked whenever the feature
// is implemented. This causes an otherwise unnecessary ThreadLocal
// lookup. Once we have the proper bootstrapping implemented,
// I expect we can dispense with WebConfiguration.hasFlows.

Consider this line too:

LOGGER.log(Level.WARNING,
"

{0} was set to none, but Faces Flows requires {0}

is enabled. Setting to ''url''.", new Object[]

{featureName}

);

This means that facesFlows will force WindowId to be enabled, if
necessary. Can't have Flows without WindowId.

M jsf-ri/src/main/java/com/sun/faces/lifecycle/LifecycleImpl.java

  • Use the PostConstructApplicationEvent to check if the WindowId feature is enabled.
    This gives the system a chance to detect the existence or absence of flows.

M jsf-ri/src/main/java/com/sun/faces/lifecycle/LifecycleFactoryImpl.java

  • Pass ExternalContext to the LifecycleImpl ctor. Need it to get the
    WebConfiguration so we can get the application so we can subscribe to
    the PostConstructApplicationEvent.

M jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java
M jsf-ri/src/main/java/com/sun/faces/application/ApplicationImpl.java

  • Vend the FlowHandlerImpl.

// PENDING(edburns): Make this come from a factory.

M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java

  • in handleNavigation()

// PENDING(edburns): Flows currently don't work with redirect.
// Obviously I have to fix that.

// Unconditionally tell the flow system we are transitioning
// between nodes. Let the flow system figure it out if these nodes
// are in flows or not.

M jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java

  • Piggyback on the existing sessionDestroyed() event listening to notify the
    cdi context to clean up its session data when the session is destroyed.

M jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIContext.java

  • Flesh this out. Thanks to Lincoln Baxter III and Pete Muir for the help.

A jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java

  • Very simple. Even has hard-coded view ids from the basic flow test.

M jsf-ri/src/main/java/com/sun/faces/util/FacesLogger.java

  • New logger for flows.

M test/agnostic/flow/basic/src/main/webapp/index.xhtml
M test/agnostic/flow/basic/src/main/webapp/WEB-INF/web.xml
M test/agnostic/flow/basic/src/main/webapp/start.xhtml
M test/agnostic/flow/basic/pom.xml
A test/agnostic/flow/basic/src/main/java/com/acme
A test/agnostic/flow/basic/src/main/java/com/acme/FlowCDIExtension.java
A test/agnostic/flow/basic/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
A test/agnostic/flow/basic/src/main/resources/META-INF/services

  • I've found that if I put the CDI Extension outside of javax.faces.jar,
    it works. J. J. Snyder has offered to help me learn how to roll back
    this hack and get it working the right way.

D test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/VersionBean.java
A + test/agnostic/flow/basic/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java

  • A flow scoped bean.

A test/agnostic/flow/basic/src/main/webapp/WEB-INF/faces-config.xml
A test/agnostic/flow/basic/src/main/webapp/WEB-INF/beans.xml
A test/agnostic/flow/basic/src/main/resources/META-INF
A test/agnostic/flow/basic/src/main/resources/META-INF/persistence.xml

  • Extra XML stuff.

D jsf-ri/conf/share/javax.enterprise.inject.spi.Extension
D jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIExtension.java
M jsf-ri/build.xml

  • Until I can get to the bottom of why the custom extension doesn't work
    in GlassFish when it is bundled into the javax.faces.jar, I'm removing
    the code that implements it in javax.faces.jar and moving it to the
    test app.
Comment by Ed Burns [ 06/Apr/12 ]

http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-730

Next flow checkpoint. Can define the existince of a flow within a page.

2256 old tests pass. 4 new tests pass.

SECTION: Spec changes
---------------------

A jsf-ri/conf/share/faces-flow.taglib.xml

  • My thinking for JSF is still influenced by the convention over
    configuration emphasis of Ruby on Rails. To that end, I want to make
    it so whatever flow definition you can do by putting XML in your
    faces-config.xml, you can also do with the exact same syntax in your
    Facelet pages, with the advantage of the system being able to infer
    some things from the context of the page in which the content resides.

Consider these changes to the start.xhtml page.

<html xmlns="http://www.w3.org/1999/xhtml"

  • xmlns:h="http://java.sun.com/jsf/html">
    + xmlns:h="http://java.sun.com/jsf/html"
    + xmlns:f="http://java.sun.com/jsf/core"
    + xmlns:j="http://java.sun.com/jsf/flow">
    +
    + <f:metadata>
    + <j:faces-flow-definition id="flow">
    +
    + <!-- A faces-flow-definition in a facelet page without any other
    + children declares a faces flow equivalent to this:
    +
    + <default-node>the name of this page without any extension</default-node>
    + <view id="the name of this page without any extension">
    + <vdl-document>the name of this page with the extension</vdl-document>
    + </view>
    +
    + -->
    +
    + </j:faces-flow-definition>
    + </f:metadata>
    <head>
    <title>First page in the flow</title>
    </head>

M jsf-api/src/main/java/javax/faces/flow/FlowHandler.java

  • New methods.

+ public abstract Flow getFlow(String id);
+
+ public abstract Flow getFlowByNodeId(String id);
+
+ public abstract void addFlow(Flow toAdd);
+

M jsf-api/src/main/java/javax/faces/flow/Flow.java

  • Flesh this out so flows can be created dynamically.

SECTION: Modified Files
-----------------------
M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java

  • To enable flows to be lazily created and loaded from facelet pages, we
    need to leverage our existing view metadata mechanism from JSF 2.0.
    This probably should have been done already. Now, in
    handleNavigation(), we inspect the metadata (if any) of the view to
    which we are navigating. This enables any flow content contained in
    the page to be loaded and populated. Now, I know this dynamic flow
    business is primarily useful at development time, and a production
    system wouldn't want lazy flow creation, but we need to do whatever we
    can to appeal to developers.

M jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java

  • I discovered a bug I introduced when adding the first commit for JSF
    2.2 tag libs.

M jsf-ri/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java

  • Turns out taglibs defined within the runtime jar were not being
    found. This commit fixes that, but we must have a-priori knowledge of
    such taglibs. This assumption is reasonable.

M jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java

  • Remove the hard coded "/start" from this class. Flows can now be
    defined in pages.

M test/web-profile/flow/basic/src/main/webapp/start.xhtml

  • Add metadata for defining the flow.

A jsf-ri/src/main/java/com/sun/faces/facelets/flow
A jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultNodeTagHandler.java
A jsf-ri/src/main/java/com/sun/faces/facelets/flow/ViewNodeTagHandler.java
A jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java
A jsf-ri/src/main/java/com/sun/faces/facelets/flow/VDLDocumentTagHandler.java
A jsf-api/src/main/java/javax/faces/flow/ViewNode.java

  • Tag handlers. Still need to flesh these out.

Sending jsf-api/src/main/java/javax/faces/flow/Flow.java
Sending jsf-api/src/main/java/javax/faces/flow/FlowHandler.java
Adding jsf-api/src/main/java/javax/faces/flow/ViewNode.java
Adding jsf-ri/conf/share/faces-flow.taglib.xml
Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
Sending jsf-ri/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultNodeTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/VDLDocumentTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/ViewNodeTagHandler.java
Sending jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java
Sending test/web-profile/flow/basic/src/main/webapp/start.xhtml
Transmitting file data .............
Committed revision 9832.

Commited to trunk.

Comment by Ed Burns [ 10/Apr/12 ]

Committed to i_spec_730 prototype branch.

Sending jsf-api/src/main/java/javax/faces/flow/Flow.java
Sending jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultNodeTagHandler.java
Sending jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java
Sending test/web-profile/flow/basic/src/main/webapp/WEB-INF/web.xml
Adding test/web-profile/flow/basic-multi-page
Adding test/web-profile/flow/basic-multi-page/nbactions.xml
Adding test/web-profile/flow/basic-multi-page/pom.xml
Adding test/web-profile/flow/basic-multi-page/src
Adding test/web-profile/flow/basic-multi-page/src/main
Adding test/web-profile/flow/basic-multi-page/src/main/java
Adding test/web-profile/flow/basic-multi-page/src/main/java/com
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/acme
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/acme/FlowCDIExtension.java
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow/basic
Adding test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java
Adding test/web-profile/flow/basic-multi-page/src/main/resources
Adding test/web-profile/flow/basic-multi-page/src/main/resources/META-INF
Adding test/web-profile/flow/basic-multi-page/src/main/resources/META-INF/persistence.xml
Adding test/web-profile/flow/basic-multi-page/src/main/resources/META-INF/services
Adding test/web-profile/flow/basic-multi-page/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
Adding test/web-profile/flow/basic-multi-page/src/main/webapp
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/WEB-INF
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/WEB-INF/beans.xml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/WEB-INF/faces-config.xml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/WEB-INF/web.xml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/index.xhtml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/next_a.xhtml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/nonFlow.xhtml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/start.xhtml
Adding test/web-profile/flow/basic-multi-page/src/test
Adding test/web-profile/flow/basic-multi-page/src/test/java
Adding test/web-profile/flow/basic-multi-page/src/test/java/com
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test/agnostic
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test/agnostic/flow
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test/agnostic/flow/basic
Adding test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test/agnostic/flow/basic/FlowEntryExitIT.java
Sending test/web-profile/flow/pom.xml
Transmitting file data ...................
Committed revision 9844.

Comment by Ed Burns [ 13/Apr/12 ]

Sending jsf-api/src/main/java/javax/faces/flow/Flow.java
Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
Sending test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/bounded-task-flow.xhtml
Sending test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/next_a.xhtml
Deleting test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/start.xhtml
Deleting test/web-profile/flow/basic-multi-page/src/main/webapp/flow01
Sending test/web-profile/flow/basic-multi-page/src/main/webapp/index.xhtml
Transmitting file data ......
Committed revision 9861.

Comment by Ed Burns [ 13/Apr/12 ]

Not a good stopping place, but saving the work anyway.

Comment by Ed Burns [ 17/Apr/12 ]

snapshot

Comment by Ed Burns [ 18/Apr/12 ]

2240 old style tests passed, 10 new style tests passed.

<j:faces-flow-return> works.

SECTION: Modified Files
----------------------------
M jsf-ri/conf/share/faces-flow.taglib.xml
D jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultNodeTagHandler.java

  • Remove DefaultNodeTagHandler. No need for it.
  • Add from-outcome, and navigation-case tags.

M jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java

  • pull together the faces-flow-return information.

M jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java

  • This one really threw me for a loop. The inner class
    MetadataCompilationHandler had no-ops for its characters() method.
    This was causing the <j:from-outcome> contents to not be processed.

M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java

  • Upon faces-flow-return, feed the outcome through the navigation rules once more.

M test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java

  • Give the bean a return value.

M test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/bounded-task-flow.xhtml

  • Declare the <faces-flow-return>.

M test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/next_a.xhtml

  • Cosmetic changes.

M jsf-api/src/main/java/javax/faces/flow/Flow.java

  • Add returns to the data structure.

A + jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowReturnTagHandler.java
A jsf-ri/src/main/java/com/sun/faces/facelets/flow/FlowNavigationCase.java
A + jsf-ri/src/main/java/com/sun/faces/facelets/flow/NavigationCaseTagHandler.java
A + jsf-ri/src/main/java/com/sun/faces/facelets/flow/FromOutcomeTagHandler.java

  • Tag handlers to support <j:faces-flow-return>.

A + test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/next_b.xhtml
A + test/web-profile/flow/basic-multi-page/src/main/webapp/return1.xhtml

  • return support

Sending jsf-api/src/main/java/javax/faces/flow/Flow.java
Sending jsf-ri/conf/share/faces-flow.taglib.xml
Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
Sending jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java
Deleting jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultNodeTagHandler.java
Sending jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowReturnTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/FlowNavigationCase.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/FromOutcomeTagHandler.java
Adding jsf-ri/src/main/java/com/sun/faces/facelets/flow/NavigationCaseTagHandler.java
Sending test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/agnostic/flow/basic/FlowBean.java
Sending test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/bounded-task-flow.xhtml
Sending test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/next_a.xhtml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/next_b.xhtml
Adding test/web-profile/flow/basic-multi-page/src/main/webapp/return1.xhtml
Transmitting file data ..............
Committed revision 9862.

Comment by Ed Burns [ 20/Apr/12 ]

Implements #

{facesFlowScope}

. Analogous to ADF's #

{pageFlowScope}

.

Comment by Ed Burns [ 26/Apr/12 ]

Working on the <router> equivalent.

Comment by Ed Burns [ 17/May/12 ]

Please add a contract definition facility, similar in spirit to <cc:interface>.

Comment by Ed Burns [ 28/Jun/12 ]

snapshot

Comment by Ed Burns [ 02/Jul/12 ]

Changes to make it so FDL stored in WEB-INF gets loaded first, if present. This is one way to satisfy the requirement that FDL not be visible to app developers.

Comment by Ed Burns [ 05/Jul/12 ]

Patch to make flows work in jar.

Comment by Ed Burns [ 25/Jul/12 ]

snapshot

Comment by Ed Burns [ 30/Aug/12 ]

Snapshot before lunch.

Comment by Ed Burns [ 06/Oct/12 ]

Save work from airplane.

Comment by Ed Burns [ 15/Oct/12 ]

Committed first impl of @FlowDefinition approach. See < http://hudson-sca.us.oracle.com/view/MOJARRA_ALL/job/MOJARRA_TRUNK_DEPLOY/303/ > and < http://tim-vm9.us.oracle.com:7070/hudson/view/Trunk/job/trunk-test-glassfish-4_0/434/ > (when it starts).

Comment by Ed Burns [ 16/Oct/12 ]

Fixed bug revealed by running older tests. Track < http://hudson-sca.us.oracle.com/view/MOJARRA_ALL/job/MOJARRA_TRUNK_DEPLOY/307/ > and < http://tim-vm9.us.oracle.com:7070/hudson/view/Trunk/job/trunk-test-glassfish-4_0/441/ >.

Generated at Fri Apr 28 18:01:41 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.