Class ViewScopeManager

    • Constructor Detail

      • ViewScopeManager

        public ViewScopeManager()
        Constructor.
    • Method Detail

      • locateViewMapId

        protected static String locateViewMapId​(FacesContext facesContext,
                                                Map<String,​Object> viewMap)
        Static method that locates the ID for a view map in the active view maps stored in the session. It just performs a == over the view map because it should be the same object.
        Parameters:
        facesContext - The faces context
        viewMap - The view to locate
        Returns:
        located ID
      • clear

        public void clear​(FacesContext facesContext)
        Clear the current view map using the Faces context.
        Parameters:
        facesContext - the Faces context.
      • clear

        @Deprecated
        public void clear​(FacesContext facesContext,
                          Map<String,​Object> viewMap)
        Deprecated.
        Clear the given view map. Use the version with viewMapId.
        Parameters:
        facesContext - the Faces context.
        viewMap - the view map.
      • clear

        public void clear​(FacesContext facesContext,
                          String viewMapId,
                          Map<String,​Object> viewMap)
        Clear the given view map.
        Parameters:
        facesContext - the Faces context.
        viewMapId - The ID of the view map
        viewMap - the view map.
      • destroyBeans

        public void destroyBeans​(FacesContext facesContext,
                                 Map<String,​Object> viewMap)
        Destroy the managed beans from the given view map.
        Parameters:
        facesContext - the Faces Context.
        viewMap - the view map.
      • getInstance

        public static ViewScopeManager getInstance​(FacesContext facesContext)
        Get our instance.
        Parameters:
        facesContext - the FacesContext.
        Returns:
        our instance.
      • isListenerForSource

        public boolean isListenerForSource​(Object source)
        Is a listener for the given source.
        Specified by:
        isListenerForSource in interface SystemEventListener
        Parameters:
        source - the source.
        Returns:
        true if UIViewRoot, false otherwise.
      • sessionCreated

        public void sessionCreated​(jakarta.servlet.http.HttpSessionEvent se)
        Create the associated data in the session (if any).
        Specified by:
        sessionCreated in interface jakarta.servlet.http.HttpSessionListener
        Parameters:
        se - the HTTP session event.
      • sessionDestroyed

        public void sessionDestroyed​(jakarta.servlet.http.HttpSessionEvent httpSessionEvent)
        Destroy the associated data in the session.
        Specified by:
        sessionDestroyed in interface jakarta.servlet.http.HttpSessionListener
        Parameters:
        httpSessionEvent - the HTTP session event.