[JAVASERVERFACES_SPEC_PUBLIC-1100] Add "id" attribute for all elements, unless rendering is *not* HTML5. Created: 14/May/12  Updated: 01/Aug/14  Resolved: 14/May/12

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: None
Fix Version/s: 2.2 Sprint 12

Type: New Feature Priority: Minor
Reporter: Ed Burns Assignee: Ed Burns
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 1 hour, 10 minutes
Original Estimate: Not Specified


HTML5 allows an "id" attribute on all elements. When rendering HTML5 content (the default for JSF 2.2) the "id" attribute must be supported for all component elements.

Comment by Ed Burns [ 14/May/12 ]

In practice, the only element that doesn't already output an "id" attribute is <h:head>.

Comment by Manfred Riem [ 01/Aug/14 ]

Closing resolved issue out

[JAVASERVERFACES_SPEC_PUBLIC-1097] Include Missing Id Attribute For h:body In VDL Docs Created: 07/May/12  Updated: 01/Aug/14  Resolved: 14/May/12

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Documentation: Javadoc, TLDDoc, RenderkitDoc, PDF
Affects Version/s: None
Fix Version/s: 2.2 Sprint 12

Type: Bug Priority: Major
Reporter: rogerk Assignee: Ed Burns
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 1 hour, 10 minutes
Original Estimate: Not Specified


It appears that the "id" attribute is not in the VDL docs for h:body. Refer to

Comment by Manfred Riem [ 01/Aug/14 ]

Closing resolved issue out

[JAVASERVERFACES_SPEC_PUBLIC-1092] Exception silently swallowed: exception within method referenced by methodExpression. Created: 27/Apr/12  Updated: 01/Aug/14  Resolved: 27/Apr/12

Status: Closed
Project: javaserverfaces-spec-public
Component/s: EL
Affects Version/s: 1.2, 2.0, 2.1
Fix Version/s: 2.2 Sprint 12

Type: Bug Priority: Minor
Reporter: Ed Burns Assignee: Ed Burns
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 22 hours, 45 minutes
Time Spent: 1 hour, 15 minutes
Original Estimate: 1 day

Issue Links:
blocks JAVASERVERFACES-2397 Exception silently swallowed: excepti... Closed


Exceptions are being incorrectly swallowed in at least two cases.

Case MethodExpressionValueChangeListener.processValueChange():

The spec for that method ends with, "If that fails for any reason, throw an AbortProcessingException, including the cause of the failure." This is incorrect. The method referenced by the MethodExpression needs to be able to signal that no further processing should occur just as any other implementation of ValueChangeListener.processValueChange() would.

Case MethodExpressionActionListener.processAction():

This method has same problem as processValueChange().

Comment by Ed Burns [ 27/Apr/12 ]

The fix for this will be to simply remove that last sentence from both cases.

Comment by aschwart [ 27/Apr/12 ]

Thanks for logging this Ed. Just wanted to provide a pointer to this old issue:


Which seems to cover the same ground. (Meant to include this in my email yesterday.)

Comment by Ed Burns [ 27/Apr/12 ]

Fix committed to trunk in javadoc and framemaker. Still need to apply the change as mentioned in JAVASERVERFACES-2397.

Comment by Manfred Riem [ 01/Aug/14 ]

Closing resolved issue out


[JAVASERVERFACES_SPEC_PUBLIC-1089] Support for HTML5 passthru attributes (including data-* and accessibilit) Created: 12/Apr/12  Updated: 01/Aug/14  Resolved: 26/Oct/12

Status: Closed
Project: javaserverfaces-spec-public
Component/s: Components/Renderers
Affects Version/s: 2.0, 2.1
Fix Version/s: 2.2 Sprint 12

Type: Sub-task Priority: Minor
Reporter: Ed Burns Assignee: Ed Burns
Resolution: Fixed Votes: 8
Labels: None
Remaining Estimate: 1 day, 16 hours, 45 minutes
Time Spent: 1 day, 7 hours, 15 minutes
Original Estimate: 3 days

Attachments: Text File 20120515-2322-i_spec_1089.patch     Text File 20120516-2342-i_spec_1089.patch     Text File 20120625-i_spec_1089-snapshot.patch     Text File 20120716-1550-i_spec_1089.patch     Text File 20120717-0052-i_spec_1089.patch    
Issue Links:
blocks JAVASERVERFACES-2449 Verify that passThroughAttributes wor... Closed


<paul_dijou> I have read about JSF 2.2 supporting HTML5, great news
<paul_dijou> But I was wondering
<paul_dijou> Does it includes support for custom tag attributes (like "data-xxx")

Comment by Ed Burns [ 12/Apr/12 ]

<paul_dijou> Another idea would be that JSF component have a "data" attribute
<paul_dijou> Which could accepte Map<String,String> or JSon or just plain String correctly formated
<paul_dijou> And so <h:graphicImage src="..." data="

{tooltip:value, test:test}

"/> would produce <img src="..." data-tooltip="value" data-test="test"/>
<paul_dijou> (I think HAML syntax do something no far away from that)

<paul_dijou> Here you go :


<paul_dijou> Of course, you can have nested properties :data => {:test => {:sub1 => "val1", :sub2 => "val2"}} will result in : data-test-sub1="val1" data-test-sub2="val2"

Comment by Frank Caputo [ 12/Apr/12 ]

I've already done it in a project by simply wrapping the ResponseWriter. Not that flexible and a bit hacky:

public class Html5ResponseWriter extends ResponseWriterWrapper {

private ResponseWriter wrapped;

public Html5ResponseWriter(ResponseWriter wrapped)

{ this.wrapped = wrapped; }

public ResponseWriter getWrapped()

{ return wrapped; }

public ResponseWriter cloneWithWriter(Writer writer)

{ return new Html5ResponseWriter(super.cloneWithWriter(writer)); }

public void startElement(String name, UIComponent component) throws IOException {
super.startElement(name, component);
if(component == null)

{ return; }

Map<String,Object> attributes = component.getAttributes();
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
String key = entry.getKey();

if(key.startsWith("data-") || key.equals("placeholder") || key.equals("pattern")) {
Object value = entry.getValue();
if(value != null)

{ writeAttribute(key, value, key); }


Comment by Ed Burns [ 16/May/12 ]


Comment by Ed Burns [ 16/May/12 ]

AS> Ed -
AS> I find the use of JSON here very confusing and unnecessarily complex.

AS> Two simpler options that I would prefer:

AS> 1. Enhance f:attribute to allow pass-thru of data- attributes, eg:

AS> <h:outputText>
AS> <f:attribute name="data-andy-rocks" value="false"/>
AS> </h:outputText>

AS> Thinking the <f:attribute> handler would populate a map that hangs off
AS> of the component's attribute map. Renderers would be required to
AS> iterate over this map and blast out all of attributes.

AS> 2. Add a new f:dataAttribute tag, eg:

AS> If we prefer not to complicate <f:attribute>, we could do:

AS> <h:outputText>
AS> <f:dataAttribute name="andy-rocks" value="false"/>
AS> </h:outputText>

AS> With a similar implementation.

AS> Ideally either/both of these would support EL-binding, eg:

AS> <h:outputText>
AS> <f:dataAttribute name="andy-rocks" value="#


AS> </h:outputText>

AS> Regarding:

>> If the view being rendered is not HTML5, the value of this attribute
>> must be ignored.

AS> I would lean towards passing these through regardless of the target
AS> markup language. Although data- attributes are not strictly valid
AS> pre-HTML5, simply dropping these might make life more difficult for an
AS> app developer who needs to target a range of browsers (including both
AS> HTML5 and pre-HTML5 browsers).

Comment by paul_dijou [ 17/May/12 ]

I agree that having <f:attribute> is easier to read and to understand but it's have its own problem :

  • it's quite verbose
  • it's not really dynamic if you need to put condition on what you should pass to the data attribute. You would probably need a "rendered" attribute on the <f:attribute>, and it would become quite heavy.
  • why does most of attributes are in the original tag and just some of them need to use <f:attribute> ?
  • should the <f:attribute> support any attribute ?

I'm fine with the "data" attribute and I like the current patch. However, does the current implementation support EL ?

<h:outputText value="Test" data="{toggle: #{bean.dataToggle}, hide: #{bean.hide}}" />

IMO, it should be ok to write this code.

For the record, I was discussing the subject with RichFaces guys, here is a summary : https://issues.jboss.org/browse/RF-12177

Comment by Kim Haase [ 06/Jun/12 ]

It's important for accessibility that generated layout tables should support the role attribute, particularly role="presentation", which indicates to screen readers that the table is used for layout rather than data. If the panelGrid tag doesn't specifically support the tag, it should be allowed on a pass-through basis.

This requirement is based on section 1194.22(a) of the 508 requirement, "A text equivalent for every non-text element shall be provided (e.g., via "alt", "longdesc", or in element content)." (See http://www.access-board.gov/sec508/guide/1194.22.htm#%28a%29.) Oracle has a number of specific requirements that implement this rule, including the rule about the role="presentation" attribute; I imagine other companies do too.

Comment by Ed Burns [ 22/Jun/12 ]

Simple implementation in place. Please see JAVASERVERFACES-2449 for complete test coverage.

Comment by Ed Burns [ 22/Jun/12 ]

I can't get this to stay closed. People keep coming up with new features.

Comment by Ed Burns [ 26/Jun/12 ]

Let's see if it stays closed now!

Comment by Ed Burns [ 16/Jul/12 ]

Additional work required for f:selectItem and f:selectItems

Comment by Ed Burns [ 17/Jul/12 ]


Comment by Ed Burns [ 26/Oct/12 ]

Revision 10288 seems to have the required fixes for f:selectItem and f:selectItems.

Comment by Manfred Riem [ 01/Aug/14 ]

Closing resolved issue out

[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

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:
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
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
is related to JAVASERVERFACES_SPEC_PUBLIC-533 Externalization of application metadata Closed
JAVASERVERFACES_SPEC_PUBLIC-531 Support for non-page nodes in the nav... Sub-task Closed rogerk  
JAVASERVERFACES_SPEC_PUBLIC-977 Type-safe view config and navigation Sub-task Closed  
Issuezilla Id: 730
Status Whiteboard:

size_large importance_medium


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.

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 ]


Comment by rogerk [ 27/Oct/10 ]


Comment by rogerk [ 16/Nov/10 ]


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 ]


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.


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


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.


  • 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:


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

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



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 ]


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>
    <title>First page in the flow</title>

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 ]


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 #


. Analogous to ADF's #



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 ]


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 ]


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 Tue Dec 01 02:54:11 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.