RE: Proposed changes to DefaultFormMap & FormType

"Christian Cryder" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
But it sounds like what Shawn is suggesting (I think) is that an incoming ""
should be automatically mapped to null, so that the application code doesn't
have to check for both "" and null...I personally think that would be a
safe/convenient thing to do, and it makes sense since its precluded by using
a NotNullValidator. But maybe someone else can think of a situation I'm
overlooking? Or maybe I'm misunderstanding Shawn's comments?

Christian
----------------------------------------------
Christian Cryder [[email protected]]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Diez B. Roggisch
> Sent: Friday, April 04, 2003 4:03 AM
> To: [email protected]
> Subject: Re: [Barracuda] Proposed changes to DefaultFormMap & FormType
>
>
> Hi,
>
> > However, what about my comment about empty strings from the
> > ServletRequest? Is there any reason to even attempt parsing if the
> > string is empty? Shouldn't that get mapped directly to null for the real
> > value? I believe if the FormType is anything but String and you pass in
> > an empty string the resulting value will be null. However if the type is
> > String and you pass an empty String you get an empty String. That seems
> > to create a little discrepency in the way the values are returned. What
> > do you think?
>
> This is already been handled correct (and in your sense :)) by
> the validators.
> Iman did great work on this. Every validator has to ignore "" or
> null. If you
> want a mandatory field, add a NotNullValidator.
>
> Diez
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.