[ https://issues.apache.org/jira/browse/MYFACES-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788118#comment-13788118 ]
Leonardo Uribe commented on MYFACES-3797: ----------------------------------------- #1 That's precisely the problem. Before do the instantiation we need to check if cdi is active, then if the feature is enabled, then invoke the method and then we need to multiply that for each converter/validator in the page. What I mean is even if the related code looks fast, in the whole context it is not because that's a sensitive part. About break getConverter() and getValidators() the idea is the adapter implements FacesWrapper. In that way, if the code needs something special (an extra interface in the converter or validator), in that part they can just do the check and get the wrapped instance and that's it. Most of the time that's not necessary, because that's the reason why there is an interface for those objects, to define a contract between the view and the controller. Remember we didn't have a generic FacesWrapper in previous implementations of the spec but now we have it and this is a good example where we can use it. Since we are talking about put this in 2.2 branch, this feature is new and the workaround can be done in third party libraries quite easily (if there is a need, but most of the time it is unlikely) By all previous reasons already exposed, in my opinion a solution using an adapter looks better. > cdi support for converters and validators > ----------------------------------------- > > Key: MYFACES-3797 > URL: https://issues.apache.org/jira/browse/MYFACES-3797 > Project: MyFaces Core > Issue Type: New Feature > Components: JSR-344 > Reporter: Gerhard Petracek > Assignee: Gerhard Petracek > Attachments: MYFACES-3797.patch > > > with > <context-param> > > <param-name>org.apache.myfaces.CONVERTER_INJECTION_ENABLED</param-name> > <param-value>true</param-value> > </context-param> > and > <context-param> > > <param-name>org.apache.myfaces.VALIDATOR_INJECTION_ENABLED</param-name> > <param-value>true</param-value> > </context-param> > it should be possible to enable cdi support for converters/validators. > we need the config, because it was postponed for the spec. -- This message was sent by Atlassian JIRA (v6.1#6144)