Re: Proposed changes to DefaultFormMap & FormType
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
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