Re: Proposed changes to DefaultFormMap & FormType
"Diez B. Roggisch" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, Am Freitag, 4. April 2003 17:06 schrieb Shawn Wilson: > The Zip file attached contains an updated version of DefaultFormMap that > I think accomplishes what we're talking about here. Look for > saw_040403.1. I don't think this breaks anything but of course I can't > be sure. Please provide any comments. Ok, here they are: In my opionion, the approach you took interferes with the mapping too early. In the case of someone reusing a form-map for a second mapping (this isn't a good idea in general, but might happen), the map would end up in not overwriting a previously mapped value. And I personally don't think that not storing the orig-value but null instead is a good idea. This might cause trouble (think of calling toString() when repopulating the values). Your own comment says that you don't assume that a request will give you a null for an origVal. So lets have this consistent in the form-map as well. And even if the value might not be useful to us - its still what the user has entered, and repopulation should give it back to him or her. I modified the DefaultFormMap in a slightly different way which will make sure that the bug you discovered won't occur. I've attached it, so you can see if it matches your needs. Look for dbr_. If its ok, I'll commit it. Regards, Diez
DefaultFormMap.zip
(application/x-zip, 6.6 KB) - not displayed