[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-20 Thread [EMAIL PROTECTED]
JSF validation is not designed for cross-field validations. I would do these kind of validations in the action method. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959652#3959652 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mo

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-20 Thread petemuir
JSF validation is great for ensuring an isolated field is valid (e.g. Postcode, Bank Account No, National Insurance No). I haven't used it to do 'contextual validation'. I don't think you can use the Hibernate Validator in the JSF validation phase in such a way - @AssertTrue and @AssertFalse m

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-20 Thread denis-karpov
Yes. It is great idea to perform validation before actual assignment. I have examined sources. But I still can not catch one thing. -Look. Simple case. I have two inputs for two numbers and I want that one be greater than another. -Or if one value greater than 18 then another value must be not n

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-19 Thread [EMAIL PROTECTED]
Please just take a look at how s:validateAll is used in the registration example. I'm sure you will be happy with what you find there: http://docs.jboss.com/seam/latest/reference/en/html/tutorial.html#registration-example View the original post : http://www.jboss.com/index.html?module=bb&op=vie

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-19 Thread denis-karpov
In many cases validation depends not only from a value of a single control. It depends from context. From other properties of the bean. And as I understand, JSF like validation does not support this cases. I tried to use Validator for a bean and ( @IfInvalid/@Valid ). I got the problem that wa

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-18 Thread [EMAIL PROTECTED]
We've not changed where the constraints are specified. Just what *triggers* the validation. And the reason for it is that it is MUCH better to never write invalid data onto your managed entity objects. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958926#39

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-18 Thread davidgeary
Yes, I was missing a @Valid annotation. Thanks. Gavin: would you care to elaborate why (I assume) you've switched from validation specified in model classes, ala Rails, to validation specified in views, ala JSF? I'd be most interested in knowing the rationale behind that switch. david geary

[jboss-user] [JBoss Seam] - Re: @IfInvalid throws unhandled exception

2006-07-18 Thread [EMAIL PROTECTED]
No, that exception is coming from Hibernate, not from the validation performed by @IfInvalid. You are probably missing an @Valid annotation, or something like that. BTW, @IfInvalid/@Valid are semi-deprecated, and are no longer used in the examples. I strongly recommend migrating to s:validateA