Noboy intrested in using BeanEditor with JSR-303? At the moment even: <t:form validate="this"> <t:BeanEditor object="beanA" /> <t:BeanEditor object=" beanB " /> <t:form/>
Is not (bean)validating properly.... Luca ----- Original Message ----- > From: "Luca Menegus" <luca.mene...@dbmsrl.com> > To: "Tapestry users" <users@tapestry.apache.org> > Sent: Tuesday, 19 June, 2012 12:49:52 PM > Subject: BeanEditor should always provide a new BeanValidationContext > (JSR-303) > Hi, > we are starting to use tapestry-beanvalidator and found that the > current BeanEditor implementation can't be used with complex beans > (beans that contain other beans) for beanvalidation. > 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. > BeanEditor should provide the validation framework with a new > BeanValidationContext bound to the object being validated all the > times. > Patch with test case attached. Shell I open a jira? > Luca > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org