myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (EXTVAL-148) Support of BV GroupSequences in @BeanValidation
Date Wed, 07 Nov 2012 19:02:14 GMT

    [ https://issues.apache.org/jira/browse/EXTVAL-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492592#comment-13492592
] 

Gerhard Petracek commented on EXTVAL-148:
-----------------------------------------

here it works fine. there isn't a separation in the bv-api (see javax.validationValidator#validateValue).
basically the class/es get/s passed to the bv-engine (otherwise groups wouldn't work at all).
-> please provide an example which illustrates the issue.

tested example:

@Size.List({
        @Size(min = 4, max = 14, groups = X.class),
        @Size(min = 2, max = 7, groups = Y.class)
})

@javax.validation.GroupSequence({ X.class, Y.class })
public interface Z
{
}

+
@BeanValidation(useGroups = Z.class)

if the length is e.g. 1, group X is violated (Y doesn't get validated due to the specified
behaviour of group-sequences).
if the length is e.g. 10, group Y is violated (X passed).
if length is e.g. 6, there is no violation.
(extval just delegates to the bv engine and doesn't do the check on its own.)
                
> Support of BV GroupSequences in @BeanValidation
> -----------------------------------------------
>
>                 Key: EXTVAL-148
>                 URL: https://issues.apache.org/jira/browse/EXTVAL-148
>             Project: MyFaces Extensions Validator
>          Issue Type: Improvement
>          Components: Bean Validation
>    Affects Versions: 2.0.5
>         Environment: WAS 8
>            Reporter: Manuel Gamerdinger
>            Priority: Minor
>
> Currently the @BeanValidation tag only supports definition of explicit groups in useGroups.
There is no possibility to declare a GroupSequence. Therefore the @BeanValidation annotation
can't be used as a total replacement of the JSF f.validateBean tag.
> Example:
> Declaration of the sequence:
> @GroupSequence({Default.class, IUiGroupStage2.class})
> public interface IUiGroupSequence {
> Usage in f.validateBean works fine:
> <f:validateBean validationGroups="xxx.IGroupSequence">
> Declaring the GroupSequence in ExtVal does not work:
> @BeanValidation(useGroups=IUiGroupSequence.class)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message