Hello Laurie,
I found myself faced with the same question recently, and couldn't
figure out a solution. The 'obvious' solution was to use Map-typed
properties in my DynaActionForm declaration, but that didn't work :-(
What was the problem ? I have used map-typed properties (which, by the
way, prevents me from using the validator plugin correctly on these
properties, since I never really know how many {key,value} couples I'll
have), and ran into several problems, but in the end, there are two
solutions I can think of :
1/ Use a session-scoped form (I think this is bad design, but sometimes,
it does comes handy).
2/ Use a LazyMap (just as you would use a LazyList ;-) ).
The problem is always the same with "classical" maps (and it is the same
for the lists) :
You have a request-scoped object (a map/a list), which is initialized
when loading the JSP and sending the result to the client. But when the
latter submits his/her form, the entries in said object aren't initialized.
for instance, if you have a text field such as :
<html:text property="propMap('hello')"/>
The 'hello' key might have existed in the past, but since this is a new
request, it does not any more.
You should look at
http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html for more
information...
--
Stéphane Zuckerman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]