Class FacesContextHelper
java.lang.Object
org.springframework.faces.webflow.FacesContextHelper
Provides helper methods for getting a FacesContext that is suitable for use outside of Web Flow. Inside a running
Flow session
FlowFacesContext
is typically used instead.- Since:
- 2.2.0
- Author:
- Rossen Stoyanchev, Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.faces.context.FacesContext
getFacesContext
(Object context, Object request, Object response) Returns a faces context that can be used outside of Web Flow.static jakarta.faces.context.FacesContext
newDefaultInstance
(Object context, Object request, Object response, jakarta.faces.lifecycle.Lifecycle lifecycle) Factory method that can be used to create a new defaultFacesContext
instance.void
Release any previouslyobtained
FacesContext
if necessary.
-
Constructor Details
-
FacesContextHelper
public FacesContextHelper()
-
-
Method Details
-
getFacesContext
public jakarta.faces.context.FacesContext getFacesContext(Object context, Object request, Object response) Returns a faces context that can be used outside of Web Flow. The context must bereleased
after use.- Parameters:
context
- the native contextrequest
- the native requestresponse
- the native response- Returns:
- a
FacesContext
instance. - See Also:
-
release
-
releaseIfNecessary
public void releaseIfNecessary()Release any previouslyobtained
FacesContext
if necessary.- See Also:
-
newDefaultInstance
public static jakarta.faces.context.FacesContext newDefaultInstance(Object context, Object request, Object response, jakarta.faces.lifecycle.Lifecycle lifecycle) Factory method that can be used to create a new defaultFacesContext
instance.- Parameters:
context
- the native contextrequest
- the native requestresponse
- the native responselifecycle
- the JSF lifecycle- Returns:
- a new
FacesContext
instance
-