This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

SWF 2.3.1 + JSF Composite Component: Not Working

I just noticed this unexpected behavior with composite components. It is a known issue (JIRA SWF-1468) which has been set to "resolved" as of inability to reproduce. Nevertheless it still exists.

Steps to reproduce

Create composite component that contains a composite:insertFacet

Create a flow with one view-state

Create a view that uses the composite component

Run the application and load the page

Reload the page twice (in the same flow state)

The problem occurs when a <composite:implementation> contains e.g. a <composite:insertFacet> (see example below). If the page is refreshed in the browsers SWF unmarshals a previously saved snapshot (including the JSF component tree). When the deserialization reaches the composite:insertFacet Mojarra's ResourceImpl tries to obtain a resource through the JSF ResourceManager which again is obtained from the current FacesContext. The FacesContext instance isn't set at this point, though, since the deserialization takes place before the "resumed flow" event is fired (which would mean the creation of a FlowFacesContext in FlowFacesContextLifecycleListener).

I already updated that issue and added a patch for the associated issue project. Could you please reopen it?