[jboss-jira] [JBoss JIRA] (WFLY-13754) Allow injection for JSF artifacts

Ricardo Martin Camarero (Jira) issues at jboss.org
Fri Aug 7 05:58:00 EDT 2020


Ricardo Martin Camarero created WFLY-13754:
----------------------------------------------

             Summary: Allow injection for JSF artifacts
                 Key: WFLY-13754
                 URL: https://issues.redhat.com/browse/WFLY-13754
             Project: WildFly
          Issue Type: Bug
          Components: JSF
    Affects Versions: 20.0.1.Final
            Reporter: Ricardo Martin Camarero
            Assignee: Ricardo Martin Camarero
         Attachments: test-javaee6web-injectArtifacts.war

In the JSF 2.3 specification chapter {{5.4.1 JSF Managed Classes and Java EE Annotations}} the following statement is said:

{quote}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.
{quote}
{quote}In addition to managed beans being injectable in this manner, the following JSF artifacts are also injectable.
{quote}

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|https://github.com/javaee/javaserverfaces-spec/issues/763]).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list