Announcement Announcement Module
No announcement yet.
SWF 2.3.1 + JSF Composite Component: Not Working Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    1. Create composite component that contains a composite:insertFacet
    2. Create a flow with one view-state
    3. Create a view that uses the composite component
    4. Run the application and load the page
    5. 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?

    View Markup
    HTML Code:
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <ui:composition xmlns=""
      <ui:define name="content">
            <!-- ... -->
            <!-- ... -->
    Composite Component Markup
    HTML Code:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns=""
        	<cc:insertFacet name="message" />