You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Danny Lee <ha...@yahoo.de> on 2006/03/01 12:13:22 UTC

Fast&Easy Populating of the HashMap attribute

Hi guys!


I have a very general question, about populating HashMaps (and other 
stuff, but we just take HashMaps this time).

Let say, I have a Product Bean, with some simple attributes (Name, ID),
and some HashMap attributes (infos, pictures, details).

It's quite easy to generate a HTML form for "editing" these attributes,
but a real headache to submit a changed HashMap-Attributes.

If I use a nested Product inside my Form-Bean, it's seems to be
impossible to get Struts to write HashMaped stuff direct in the nested
  Product, first of all, becouse you can't index the single values there,
  so you need kind of extra map to store the user input, and then you
have to put it all together... not a big pleasure.


I wonder, if you guys have some alternative and fast method to do it.
Something like, I have a HashMap property I just populate the properties 
into <html:text> and after submitting it goes straight back to
MyNestedBean.HashMapThatWasPopulatedBefore.

Or is it just some sort of Sci/Fi? :)

Cheers,

Danny



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org