[
https://issues.apache.org/jira/browse/TAP5-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13631280#comment-13631280
]
Hudson commented on TAP5-2101:
------------------------------
Integrated in tapestry-trunk-freestyle #1044 (See
[https://builds.apache.org/job/tapestry-trunk-freestyle/1044/])
FIXED - TAP5-2101: BeanEditor should always provide a new (Revision
cb95e2236873b497211427e89f96e54282919e19)
Result = FAILURE
kaosko :
Files :
*
tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
*
tapestry-beanvalidator/src/test/java/org/example/testapp/entities/SomeOtherSimpleBean.java
* tapestry-beanvalidator/src/test/webapp/Index.tml
*
tapestry-beanvalidator/src/test/java/org/example/testapp/entities/ComplexBean.java
*
tapestry-beanvalidator/src/test/java/org/example/testapp/entities/SomeSimpleBean.java
*
tapestry-beanvalidator/src/test/java/org/example/testapp/pages/ComplexBeanDemo.java
* tapestry-beanvalidator/src/test/webapp/ComplexBeanDemo.tml
*
tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
> BeanEditor should always provide a new BeanValidationContext (JSR-303)
> ----------------------------------------------------------------------
>
> Key: TAP5-2101
> URL: https://issues.apache.org/jira/browse/TAP5-2101
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-beanvalidator
> Reporter: Luca Menegus
> Assignee: Kalle Korhonen
> Fix For: 5.3.7, 5.4
>
> Attachments: beaneditor-jsr303.patch
>
>
> We found that the current BeanEditor implementation:
> * fails to beanvalidate (JSR-303) complex beans (beans that contain other
> beans)
> * fails to validate more than one bean in the same page (when more than one
> BeanEditor is present in teh page)
> The problem is that BeanEditor doesn't provide the correct
> BeanValidationContext to the validation framework.
> Given the following beans:
> public class ComplexBean {
> private SomeSimpleBean someSimpleBean;
> @NotNull private String simpleNotNullProperty;
> ...
> }
> public class SimpleBean {
> @Min(6) private int minValue;
> ..
> }
> One would expect that the following page would validate all the constraint
> from both ComplexBean and SimpleBean:
> <t:form validate="complexBean">
> <t:BeanEditor object="complexBean" />
> <t:BeanEditor object="complexBean.someSimpleBean" />
> ...
> Instead only ComplexBean.simpleNotNullProperty constraint is validated.
> Moreover not even:
> <t:form validate="this">
> <t:BeanEditor object="beanA" />
> <t:BeanEditor object=" beanB " />
> <t:form/>
> Is (bean)validating properly....
> BeanEditor should provide the validation framework with a new
> BeanValidationContext bound to the object being validated all the times.
--
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