Class ViewScopeStateManager

All Implemented Interfaces:
FacesWrapper<StateManager>

public class ViewScopeStateManager extends StateManagerWrapper
Right before the state of the current view is written into an ajax response, puts the pending bean storage of OmniFaces ViewScoped beans of the current view in the active view scopes, see ViewScopeStorageInSession. In a non-ajax response, this is done by ViewScopeUnloadScriptRenderer while it renders the unload script at the end of the body. A view which never reaches the client along with its unload script, such as a view which is redirected or forwarded away from, or a view which is replaced by a file download, an error page or an exception, can never have its view scoped beans destroyed by an unload. The beans of such a view are therefore destroyed at the end of the request.

This state manager is already registered by OmniFaces' own faces-config.xml and thus gets auto-initialized when the OmniFaces JAR is bundled in a web application, so end-users do not need to register this state manager explicitly themselves.

Since:
3.14.28
Author:
Bauke Scholtz
See Also:
  • Constructor Details

    • ViewScopeStateManager

      public ViewScopeStateManager(StateManager wrapped)
      Construct a new view scope state manager around the given wrapped state manager.
      Parameters:
      wrapped - The wrapped state manager.
  • Method Details