Re: [OT] Populating Form objects without Struts?

2005-06-28 Thread Adam Hardy

Greg Pelly on 28/06/05 02:23, wrote:

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.



You should read up on simple javabean functionality in JSPs. Have a look 
at one of the tutorials on the sun website.


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



RE: [OT] Populating Form objects without Struts?

2005-06-28 Thread Mark Galbreath
Yes - use .NET or JSF; Struts is dead.

~mark

-Original Message-
From: Greg Pelly [mailto:[EMAIL PROTECTED]
Sent: Monday, June 27, 2005 9:24 PM

Is there a way to harvest the advantages of ActionForms without Struts?





***
This email and any file transmitted with it may be confidential and is intended 
solely for the use of the individual or entity to whom it is addressed.  If you 
received this email in error please notify the DBM Service Desk by forwarding 
this message to [EMAIL PROTECTED]


This email has been scanned by networkMaryland Antivirus Service for the 
presence of computer viruses.


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



Re: [OT] Populating Form objects without Struts?

2005-06-28 Thread Laurie Harper

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]



[OT] Populating Form objects without Struts?

2005-06-27 Thread Greg Pelly
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

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