You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/05/04 23:37:12 UTC
[jira] Reopened: (MYFACES-2697) BeanValidation class is annotated
with @FacesValidator tag
[ https://issues.apache.org/jira/browse/MYFACES-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe reopened MYFACES-2697:
-------------------------------------
Assignee: Jakob Korherr (was: Leonardo Uribe)
Ok, I reverted the change, but now it is registered from src/main/conf/META-INF/standard-faces-config-base.xml, so I'm happy with that.
But checking the spec javadoc something is not right. See jsf 2.0 spec section 3.5.3 For example:
"....Any configuration resource that declares a list of default validators overrides any list provided in a previously processed
configuration resource. If an empty <default-validators/> element is found in a configuration resource, the list
of default validators must be cleared...."
But the code in DigesterFacesConfigDispenserImpl do this:
defaultValidatorIds.addAll (application.getDefaultValidatorIds());
There is no check for that condition. We are not saving the difference between no <default-validators/> and empty <default-validators/>.
Now, this paragraph is not clear:
"....The runtime must guarantee that the validator id javax.faces.Bean is included in the result from a call to
Application.getDefaultValidatorInfo() (see Section 7.1.11.1 "Default Validator Ids"), regardless of any
configuration found in the application configuration resources or via the @FacesValidator annotation..."
That means, no matter what happen with defaultValidatorIds, javax.faces.Bean should be included. If defaultValidatorIds is empty, but javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR is false, javax.faces.Bean should be included.
Jakob, could you take a look at this one?
> 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
> Fix For: 2.0.1-SNAPSHOT
>
>
> 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.