On Mon, 2 Dec 2002, Craig R. McClanahan wrote:

>
>
> On Sun, 1 Dec 2002, Martin Cooper wrote:
>
> > Date: Sun, 1 Dec 2002 22:18:05 -0800 (PST)
> > From: Martin Cooper <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Using a property of type Map in a DynaActionForm
> >
> > As far as I can determine, it is not possible to create a DynaActionForm
> > which has a property of type Map. It is also not possible to extend it to
> > be able to accept a property of type Map. This seems like an unfortunate
> > omission, so I'd like to fix it. First, though, I'd like to get some
> > feedback on whether there is a reason it's not currently supported, and on
> > the best way of resolving it.
> >
>
> It's *supposed* to work if you declare the property type to be
> java.util.Map instead of a concrete implementation of Map.  You'll still
> need to create your own Map instance at the moment -- I do mine in a
> custom reset() method, but we probably also need a better solution based
> on an initial expression.

Sigh. I think I must have got tangled up in too many variations on trying
to get it to work. Once I threw it all away and just did what you suggest,
it suddenly all worked. I hate that! ;-) Thanks, Craig.

Any thoughts on the other issue I mentioned, of not being able to add
fields to the bean at runtime, in a subclass?

--
Martin Cooper


>
> Craig
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to