-
Bug
-
Resolution: Done
-
Major
-
20.0.1.Final
-
None
In the JSF 2.3 specification chapter 5.4.1 JSF Managed Classes and Java EE Annotations the following statement is said:
JSF Implementations that are running as a part of Java EE 5 (or later) must allow managed bean implementations to use the annotations specified in section 14.5 of the Servlet 2.5 Specification to allow the container to inject references to container managed resources into a managed bean instance before it is made accessible to the JSF application. Only beans declared to be in request, session, or application scope are eligible for resource injection.
In addition to managed beans being injectable in this manner, the following JSF artifacts are also injectable.
And the following table of JSF classes are listed:
- javax.el.ELResolver
- javax.faces.application.ApplicationFactory
- javax.faces.application.NavigationHandler
- javax.faces.application.ResourceHandler
- javax.faces.application.StateManager
- javax.faces.component.visit.VisitContextFactory
- javax.faces.context.ExceptionHandlerFactory
- javax.faces.context.ExternalContextFactory
- javax.faces.context.FacesContextFactory
- javax.faces.context.PartialViewContextFactory
- javax.faces.event.ActionListener
- javax.faces.event.SystemEventListener
- javax.faces.lifecycle.ClientWindowFactory
- javax.faces.lifecycle.LifecycleFactory
- javax.faces.event.PhaseListener
- javax.faces.render.RenderKitFactory
- javax.faces.view.ViewDeclarationLanguageFactory
- javax.faces.view.facelets.FaceletCacheFactory
- javax.faces.view.facelets.TagHandlerDelegateFactory
The JIRA WFLY-6617 added phase listeners for injection but in general this should follow the spec and allow injection in all the commented components. The idea is adding some more elements available for injection as mojarra did (check this issue).