javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2587

CompositeComponentStackManager bug in portlet environment because of cached FacesContext (full page posts impossible)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.13
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      JSF 2.1 on JBoss AS 6.0 server with Mojarra implementation 2.1.7

      Description

      When trying to do a full page post with JSF 2 and composite components an Exception in method push() of com.sun.faces.component.CompositeComponentStackManager is thrown, because the referenced FacesContext (private member of CompositeStackManager) is released.

      In the Portlet environment the Faces Lifecycle is run across two portlet request and each establish and remove a FacesContext.
      Simple fix is to not store the FacesContext as a member variable but always get/access it via FacesContext.getCurrentInstance().
      Please note that the following Class has the same cache mechanism as well!
      com.sun.faces.el.CompositeComponentAttributesELResolver.ExpressionEvalMap

      This makes it impossible to handle full page posts in JSF 2 portlets (in order to render other portlets on the same page) where composite component are used.

        Issue Links

          Activity

          Hide
          tholier added a comment -

          See also already fixed Bug in StateContext (same cache mechanism): http://java.net/jira/browse/JAVASERVERFACES-1915

          Show
          tholier added a comment - See also already fixed Bug in StateContext (same cache mechanism): http://java.net/jira/browse/JAVASERVERFACES-1915

            People

            • Assignee:
              Unassigned
              Reporter:
              tholier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: