Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action form that contains a collection of an unkown length

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I would like to pass a hash map collection to a jsp page and for the map to be traversed to create a series of struts text boxes. Each text box will be identified by the hash map ID and the value of the text box will be the hash map value. In other words, I want the key of the map to be the value of the name attribute of the struts text box and the value of the map to be the property value of the text box.

I think there is information on this in the struts documentation. However, how do I get these values from the form back into a hash map. Do I declare a hash map attribute in the ActionForm class? This data is data base driven so I can never know how many text boxes there will be

thank you
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check outMap-Backed ActionForms
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic