[ https://issues.apache.org/jira/browse/MYFACES-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13791789#comment-13791789 ]
Leonardo Uribe commented on MYFACES-3786: ----------------------------------------- @gerhard: I have seen them. The problem is CDI is optional, so we are forced to deal with the case when CDI is not available or the case where we are not in a JavaEE compliant server. So, we need a layer that hides the details behind injection, but in an environment where CDI is present, the code should prefer integrate with CDI instead integrate with the server. The key point is still valid, JSF artifacts are managed by JSF, not by CDI. Think about this example: @ApplicationScoped public class CustomNavigationHandler extends extends ConfigurableNavigationHandler Is that valid? of course not, because the navigation handler needs to be registered in faces-config.xml to make it available. JSF controls its instantiation and lifecycle, but it requires the injection stuff from the underlying environment. In words of the spec "... the following JSF artifacts are also injectable ..." Unfortunately we can't do the same like deltaspike, without change the spec. > Web Container injection support should be provided for additional lifecycle > artifacts (not just managed beans) > -------------------------------------------------------------------------------------------------------------- > > Key: MYFACES-3786 > URL: https://issues.apache.org/jira/browse/MYFACES-3786 > Project: MyFaces Core > Issue Type: Task > Components: JSR-344 > Reporter: Leonardo Uribe > Assignee: Leonardo Uribe > Attachments: cdiELresolverWeb.zip, cdiELResolver.zip, > cdiPartialViewContext.war, cdiPartialViewContext.zip, cdi.patch, > cdiphaselistener1.patch, cdiphaselistener2.patch, cdiValidatorSource.zip, > cdiValidator.war > > > This issue is all about how to inject beans into jsf artifacts. > See JSF 2.2 section 5.4.1 > The problem here is in some point we need to give the control to the > underlying environment to inject beans into the artifacts, but we don't know > much about how to properly do it, so we need to try with examples. -- This message was sent by Atlassian JIRA (v6.1#6144)