Ok, you say "Type conversion handle this". But when will be planned that the
user-defined converters add a field error (maybe with a specific Exception
thrown as you said) ?
Cheers.
Richard.

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] la part de
Jason Carreira
Envoye : samedi 27 septembre 2003 14:19
A : [EMAIL PROTECTED]
Objet : RE: [OS-webwork] Validation Framework details


You thought what I said was overcomplicated? This sounds WAY too
complicated... Type conversion handles this...

> -----Original Message-----
> From: Fred Lamuette [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 26, 2003 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] Validation Framework details
>
>
> In fact, this way of thinking is overcomplicated. Why cant we
> add another level of validation.
>
> Level 1 before ParamsInterceptor :
>     I validate the representation types of input parameters
> (ActionContext.getContext().getParameters())
>     For instance, a string represents really a date.
>
> Level 2 after ParamsInterceptor :
>     I validate the bean data.
>     For instance, date1 is not null, date1>date2, ...
>
> Any remarks ?
> Cheers.
> Richard.
>
> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> la part de Jason Carreira Envoye : vendredi 26 septembre 2003
> 16:54 A : [EMAIL PROTECTED]
> Objet : RE: [OS-webwork] Validation Framework details
>
>
> > -----Original Message-----
> > From: Fred Lamuette [mailto:[EMAIL PROTECTED]
> >
> > My question : how can i do to see the message "Your text "Foo Bar"
> > could not be parsed as a date", what can i do in my
> dateconverter to
> > add a FieldError ????
> >
> > Cheers.
> > Richard.
>
> Short answer: You can't
> Long answer: You can't, yet...
>
> I'm trying to figure out if it's ok for you if we figure out
> how to make the converter add a field error, but then the
> RequiredFieldValidator is also going to add a message.
>
> I think we can do this with a custom runtime error...
>
> throw new XworkTypeConversionMessageException("Your text '" +
> value + "' could not be parsed as a date");
>
> The type conversion framework can be made to catch this
> exception type and add the message from it to the field errors.
>
> Jason
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to