You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Cédric Servais (Jira)" <de...@myfaces.apache.org> on 2019/11/03 21:05:00 UTC
[jira] [Commented] (MYFACES-4307) FacesValidator seems to not be
working as expected
[ https://issues.apache.org/jira/browse/MYFACES-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16966254#comment-16966254 ]
Cédric Servais commented on MYFACES-4307:
-----------------------------------------
Perfect, I'm wrong then :) Thanks for your reply.
> FacesValidator seems to not be working as expected
> --------------------------------------------------
>
> Key: MYFACES-4307
> URL: https://issues.apache.org/jira/browse/MYFACES-4307
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.3.4
> Environment: Apache Netbeans 11.1
> OpenJDK 12
> Windows 10
> Apache TomEE Plus 8.0
> MyFaces 2.3.4
> OpenWebbeans 2.0.9
> Reporter: Cédric Servais
> Priority: Major
> Attachments: UserExistValidator.java
>
>
> Hello,
> I've generated a basic FacesValidator which uses CDI to retrieve FacesContext and other Container Managed-Bean.
> I've noted several issues while doing so:
> * @FacesValidator with "managed = true" isn't enough to make this Validator a managed-bean being "Injectable".
> * @Dependent (or any other scope) must be added to workaround the previous point.
> * If you want to inject FacesContext as described in JSF 2.3 spec, you also need to add @FacesConfig(version = FacesConfig.Version.JSF_2_3), without that setting, injecting a FacesContext will result in NullPointerException.
>
> It may be that not all of this is related to MyFaces or that I misunderstood some part of the JSF 2.3 specs but I'm not able to run the attachec validator without these additions.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)