<< View previous version | view page history | view next version >>
Standard Scopes
The JSF 2.0 specification includes the standard scopes (request, session, and application) and also includes a new scope - View - which is maintained for each unique view in the session. Multiple Ajax-based requests can occur during the lifespan of a view. This scope eliminates the need for extended request scope as implemented in the ICEfaces 1.x vintage framework. ICEfaces 2.0 naturally inherits the new JSF 2.0 view scope.
Window Scope
The Window scope is an extended scope provided by the ICEfaces framework that acts much like View scope, but survives a page refresh. Under View scope a refresh results in the disposal of the current view and the creation of a new one, thus all view-scoped state is reset. ICEfaces provides a Window scope to help handle many use cases where the resetting of state on a page refresh may be undesirable. Under Window scope, if a view is disposed of, window-scoped state is held for a short configurable timeout period (typically a fraction of a second). If a GET occurs on the same view within the timeout duration, it is assumed to be a refresh of the current browser window and window-scoped state is maintained and associated with the new view. If the timeout expires, then the window-scoped state is disposed.
h3 Using Window Scope
You can indicate that a managed bean should be in Window scope by marking it with the @CustomScope annotation and specifying an expression language binding to the "window" map:
package org.icefaces.demo; import javax.faces.bean.ManagedBean; import java.io.Serializable; @ManagedBean @CustomScoped(value = "#{window}") public class MyWindowScopedBean implements Serializable { ...
h3 Other Window Scope Annotations