[jboss-user] [JBoss Seam] - Re: Object Level Validation

2007-10-10 Thread matt.drees
No, I don't think so. It'd be tough to do. As I understand it, if the validate values phase fails, then the update models phase should be skipped. But @AssertTrue methods are only going to be useful if the model attributes have been updated. So you can't check @AssertTrue methods in the vali

[jboss-user] [JBoss Seam] - Re: Object level validation

2006-12-29 Thread [EMAIL PROTECTED]
You can override the Validators component to add your own createValidator() strategy. But I don't think that's really what you are after. If you think about what I posted, the problem is not in creating a class validator or having Hibernate call it. Hibernate does exactly that by default in

[jboss-user] [JBoss Seam] - Re: Object level validation

2006-12-29 Thread awhitford
I can see someone has a similar issue: http://opensource.atlassian.com/projects/hibernate/browse/ANN-513 I though about using AssertTrue, but it felt forced, especially when I would need to use several if I wanted to actually link errors to certain fields... Is there a way that I can create a Cl

[jboss-user] [JBoss Seam] - Re: Object level validation

2006-12-28 Thread [EMAIL PROTECTED]
You can easily add extra conditions: | @AssertTrue(message="second number must be larger than the first") | public boolean checkNumbers() { | System.out.println("number1=" + number1 + " number2=" + number2); | return number2 > number1; | } | Hibernate