[jsr-314-open] inter-component and form-level validation
Pete Muir
pmuir at redhat.com
Tue Aug 18 10:11:28 EDT 2009
On 17 Aug 2009, at 22:25, Ed Burns wrote:
>
> PM> I believe to address both (1) and (2) we have to address this
> problem
> PM> anyway, as I would be very unhappy to end up with the worst case
> PM> scenario of: conversion failures -> return to user -> property
> PM> validation failures -> return to user -> cross component
> validation ->
> PM> return to user -> business logic error -> return to user -> render
> PM> next page.
>
> Pete, I don't see any way around having to go back to the user. I
> think
> first class client side validation can make this painless.
Yes, I think this is an acceptable approach, especially given that we
make Ajax validation easy.
> Of course,
> we would still do the same validation on the server side. I think
> this
> could possibly be accomodated with a JSF specific JSR-303 annotation
> that is somehow indicated at the point of the constraint declaration.
> Something like
>
> public class UserBean {
>
> @Email
> @AlsoRunOnClient
> string email;
>
> public String getEmail() {...}
> public void setEmail() {...}
>
> }
>
> We'd have another bunch of stuff in the jsf.js file, but that's why we
> have staked it out, so we can add stuff to it.
Yes, that is another topic we need to address IMO - adding a generic
client side validation framework to JSF, on top of which we build
support for JSR-303 client side validation (Emmanuel and I ensured
that 303 would support client side validation in a generic sense).
I think Alex was working on a prototype for this at some point?
More information about the jsr-314-open-mirror
mailing list