You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Manuel Gamerdinger (JIRA)" <de...@myfaces.apache.org> on 2012/11/06 16:54:11 UTC
[jira] [Created] (EXTVAL-148) Support of BV GroupSequences in
@BeanValidation
Manuel Gamerdinger created EXTVAL-148:
-----------------------------------------
Summary: 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
[jira] [Commented] (EXTVAL-148) Support of BV GroupSequences in
@BeanValidation
Posted by "Manuel Gamerdinger (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTVAL-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495161#comment-13495161 ]
Manuel Gamerdinger commented on EXTVAL-148:
-------------------------------------------
Sorry, my conclusion that GroupSequences are not supported was to quick. The validation itself works fine but the GroupSequence in combination with the ComponentInitializer does not work. Neither the built-in ComponentInitializer for rendering maxLength attributes (@Size) nor the custom ComponentInitializer for mandatory filed highlighting (@NotNull) seem to work.
> 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
[jira] [Comment Edited] (EXTVAL-148) Support of BV GroupSequences
in @BeanValidation
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTVAL-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492592#comment-13492592 ]
Gerhard Petracek edited comment on EXTVAL-148 at 11/7/12 7:02 PM:
------------------------------------------------------------------
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.)
was (Author: gpetracek):
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
[jira] [Commented] (EXTVAL-148) Support of BV GroupSequences in
@BeanValidation
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ 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
[jira] [Commented] (EXTVAL-148) Support of BV GroupSequences in
@BeanValidation
Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTVAL-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495181#comment-13495181 ]
Gerhard Petracek commented on EXTVAL-148:
-----------------------------------------
that's correct, but that also doesn't work with f:validateBean.
(-> scheduled for r7.)
> 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
> Fix For: 2.0.7
>
>
> 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