Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts: Variable number of form properties

 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a dynamic form on which there will be 1 or more "questions", each of which will have 2 or more radio button options. I build the form on the fly based on external criteria - the "questions" and answer options will be different every single time.
As struts requires a getter and setter for each property for my ActionForm class, I've come up with a really ugly way to handle this.
There must be an elegant solution out there.
Any ideas?
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone? Anyone?
 
Erik Hatcher
Author
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the indexed properties available to Struts. Dynamic forms are handled decently in Struts. I will see if I can dig up a piece of our system that uses this and post back if you still have not found the solution. But "indexed fields" is the key!
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I'm off to find more information...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic