myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2697) BeanValidation class is annotated with @FacesValidator tag
Date Thu, 20 May 2010 18:15:18 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869706#action_12869706
] 

Jakob Korherr commented on MYFACES-2697:
----------------------------------------

I cleaned up the code on FacesConfigurator, FacesConfigDispenser and DigesterFacesConfigDispenserImpl.
Furthermore I removed the installation of the BeanValidator as a default-validator from standard-faces-config-base.xml,
because this can only happend programmatically (we have to check if bean validation is available),
and added a comment there.

I also added a check for two special scenarios on FacesConfigurator, which will result in
log messages to inform the user, because they may lead to problems:
    1) the BeanValidator was disabled as a default-validator via DISABLE_DEFAULT_BEAN_VALIDATOR,
but a faces-config file adds it, which is totally ok by the spec
    2) a faces-config file added the BeanValidator but bean validation is not available in
the classpath, thus it will not work

These two scenarios could be hard to trace, because there can be lots of config files when
using some frameworks, thus I thought it would be a good idea to inform the user.

In addition I added a lot of test cases on FacesConfiguratorDefaultValidatorsTestCase which
check nearly every possible configuration scenario.

So this issue can now be resolved :)

> BeanValidation class is annotated with @FacesValidator tag
> ----------------------------------------------------------
>
>                 Key: MYFACES-2697
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2697
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0
>            Reporter: Leonardo Uribe
>            Assignee: Jakob Korherr
>
> BeanValidation class is annotated with @FacesVallidator annotation, and it should not
be.
> We know that by default BeanValidation should be added to the Application object only
if the param javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR is set to false. So, there
is no reason to use @FacesValidator, let the scanner find it and then check the property.
It is better keep things simple and simplify the code on FacesConfigurator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message