At runtime, there are six types of scopes in a Fusion web application
- Application scope
- Session scope
- Page flow scope
- View scope
- Request scope
- Backing bean scope
Application scope: The object is available for the duration of the application.
Session scope: The object is available for the duration of the session.
Page flow scope: The object is available for the duration of a bounded task flow.
Request scope: The object is available from the time an HTTP request is made until a response is sent back to the client.
Backing bean scope: Used for managed beans for page fragments and declarative components only, the object is available from the time an HTTP request is made until a response is sent back to the client. This scope is needed for fragments and declarative components because there may be more than one page fragment or declarative component on a page, and to prevent collisions, any values must be kept in separate scope instances. Therefore, any managed bean for a page fragment or declarative component must use backing bean scope.
View scope: The object is available until the view ID for the current view activity changes. This scope can be used to hold values for a given page. However, unlike request scope, which can be used to store a value needed from one page to the next, anything stored in view scope will be lost once the view ID changes.
Session scope: The object is available for the duration of the session.
Page flow scope: The object is available for the duration of a bounded task flow.
Request scope: The object is available from the time an HTTP request is made until a response is sent back to the client.
Backing bean scope: Used for managed beans for page fragments and declarative components only, the object is available from the time an HTTP request is made until a response is sent back to the client. This scope is needed for fragments and declarative components because there may be more than one page fragment or declarative component on a page, and to prevent collisions, any values must be kept in separate scope instances. Therefore, any managed bean for a page fragment or declarative component must use backing bean scope.
View scope: The object is available until the view ID for the current view activity changes. This scope can be used to hold values for a given page. However, unlike request scope, which can be used to store a value needed from one page to the next, anything stored in view scope will be lost once the view ID changes.