public class InjectionFacesContextFactory
extends javax.faces.context.FacesContextFactory
FacesContextFactory is responsible for injecting the
default FacesContext instance into the top-level FacesContext
as configured by the runtime. Doing this allows us to preserve backwards
compatibility as the API evolves without having the API rely on implementation
specific details.| Constructor and Description |
|---|
InjectionFacesContextFactory(javax.faces.context.FacesContextFactory delegate) |
| Modifier and Type | Method and Description |
|---|---|
javax.faces.context.FacesContext |
getFacesContext(Object context,
Object request,
Object response,
javax.faces.lifecycle.Lifecycle lifecycle)
Create (if needed)
and return a
FacesContext instance that is initialized
for the processing of the specified request and response objects,
utilizing the specified Lifecycle instance, for this web
application. |
public InjectionFacesContextFactory(javax.faces.context.FacesContextFactory delegate)
public javax.faces.context.FacesContext getFacesContext(Object context, Object request, Object response, javax.faces.lifecycle.Lifecycle lifecycle) throws javax.faces.FacesException
javax.faces.context.FacesContextFactoryCreate (if needed)
and return a FacesContext instance that is initialized
for the processing of the specified request and response objects,
utilizing the specified Lifecycle instance, for this web
application.
The implementation of this method must ensure that calls to the
getCurrentInstance() method of FacesContext,
from the same thread that called this method, will return the same
FacesContext instance until the release()
method is called on that instance.
The implementation must call
ExternalContextFactory.getExternalContext(java.lang.Object, java.lang.Object, java.lang.Object) to produce the
ExternalContext for the FacesContext instance.
The default implementation must call
ExceptionHandlerFactory.getExceptionHandler() and make it
so the return from that method is what gets returned from a call
to FacesContext.getExceptionHandler() on the returned
FacesContext instance.
The default implementation must call
ClientWindowFactory.getClientWindow(javax.faces.context.FacesContext) and make it
so the return from that method is what gets returned from a call
to ExternalContext.getClientWindow() on the returned
ExternalContext instance.
getFacesContext in class javax.faces.context.FacesContextFactorycontext - In Jakarta Servlet environments, the
ServletContext that is associated with this web
applicationrequest - In Jakarta Servlet environments, the
ServletRequest that is to be processedresponse - In Jakarta Servlet environments, the
ServletResponse that is to be processedlifecycle - The Lifecycle instance being used
to process this requestFacesContext.javax.faces.FacesException - if a FacesContext cannot be
constructed for the specified parametersCopyright © 2010–2024 JBoss by Red Hat. All rights reserved.