wood burning stoves*
The moose likes Struts and the fly likes Struts: Variable number of form properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts: Variable number of form properties" Watch "Struts: Variable number of form properties" New topic
Author

Struts: Variable number of form properties

Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
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

Joined: Apr 03, 2002
Posts: 95
Anyone? Anyone?
Erik Hatcher
Author
Ranch Hand

Joined: Jun 11, 2002
Posts: 111
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!


Co-author of Lucene in Action
Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
Thanks! I'm off to find more information...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts: Variable number of form properties