• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic parameter names

 
John Eric Hamacher
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

I have an HTML form on which there can, in theory, be an infinite number of checkboxes (Users are selecting files from a tree and there is no telling how many will be selected). The name of each checkbox is determined at runtime (= to the path of the file). That being the case, how can I set up an action to read these parameters? Or do it need to go back to the servlet API?

Thanks.
 
John Eric Hamacher
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is Strut 2 by the way (2.0.11.1)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regardless of using Struts or not, have you considered using the same name for them all with unique values? That makes them a lot easier to retrieve on the server.
 
John Eric Hamacher
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have another beer, Hamacher.

I assume in struts 2 this property would map to an array within the action.

Thank you very much!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic