Take another look at BeanUtils -- that's what Struts uses to auto-populate 
ActionForms from the request. You should be able to do the same thing in your 
app pretty easily using, e.g. BeanUtils.populate(form, request.getParameters()) 
or something similar.

L.

Greg Pelly wrote:

In previous projects where I have used ActionForms, I have always used
Struts.    I am currently working on a project that, for various
reasons, does not use Struts. Is there a way to harvest the advantages
of ActionForms without Struts?

In particular, I have a form that the user fills out with checkboxes and
a "comments" section. There are many of them: the business logic
dictates that the form contain 3 "zones."  Each zone has between 4 and
10 questions.  Each question has a checkbox and a  "comment" field.

Ideally I would create a bean with a series of Zone objects which
contain Question objects which each contain a boolean "checked" and a
String "comment"--problem solved.  However, I haven't ever done this
without Struts, so I don't know of any way to have the values populated
in an Object sent with the form submission--the action servlet usually
takes care of that.

Is there a tool for doing this or any suggested workaround without
Struts?  Sorry if I'm missing something completely obvious: a quick scan
of previous posts and the LazyList and BeanUtils APIs didn't make any
lights go on.

Thanks,
Greg


--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to