org.jboss.seam.faces.environment
Class FacesContextProducer
java.lang.Object
org.jboss.seam.faces.environment.FacesContextProducer
public class FacesContextProducer
- extends Object
A producer which retrieves the FacesContext for the current request
of the JavaServer Faces application by calling
FacesContext.getCurrentInstance() and stores the result as a
request-scoped bean instance.
This producer allows the FacesContext to be injected:
@Inject
FacesContext ctx;
QUESTION is it correct to use a @RequestScoped producer? If it is @Dependent,
then a developer could unknowingly bind it to a wider-scoped bean
- Author:
- Gavin King, Dan Allen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FacesContextProducer
public FacesContextProducer()
getFacesContext
@Produces
@RequestScoped
public FacesContext getFacesContext()
Copyright © 2009-2011 Seam Framework. All Rights Reserved.