You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Priya Khanna <Pr...@infosys.com> on 2007/01/10 08:52:20 UTC

Struts Dynamic Radio Button Query

Hi All,

I am attempting to create a (fairly) simple web app using struts.I need
to create a table of questions with each question having radio
buttons (a range of numeric values) so the user can input and submit
their answers:

 question1        o o o o o o o o
 question2        o o o o o o o o
 ...
 My problem is that both the questions and the number of radio buttons
needs to be dynamic (based on what is currently in the database). I can
iterate through the questions and display them in the table but I am
unsure how to 'marry' up the radio buttons, and then retrieve the data
from the form when the user submits.
 Has anyone done anything similar to this ? Any example code or
suggestions would be gratefully recieved.


Regds

Priya



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

Re: Struts Dynamic Radio Button Query

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Priya,

Priya Khanna wrote:
> My problem is that both the questions and the number of radio buttons
> needs to be dynamic (based on what is currently in the database). I can
> iterate through the questions and display them in the table but I am
> unsure how to 'marry' up the radio buttons, and then retrieve the data
> from the form when the user submits.
>  Has anyone done anything similar to this?

My company has several years of experience delivering online
questionnaires via web applications (and our most recent version uses
Struts). If you'd like to contact me off-list, I'd be happy to discuss
this with you.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpPqO9CaO5/Lv0PARAkG6AJwN761BsI3WgxLQEh+9p9rucj3rqACgmOdQ
jBpeUUSvekipdrHyfc3jjj8=
=ewlf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts Dynamic Radio Button Query

Posted by Barun Kumar Yadav <by...@sapient.com>.
 
Is your problem in retrieving the options from the DB or is it with
displaying it on the JSP.

_barun 


-----Original Message-----
From: Priya Khanna [mailto:Priya_Khanna01@infosys.com] 
Sent: Wednesday, January 10, 2007 1:22 PM
To: user@struts.apache.org
Subject: Struts Dynamic Radio Button Query


Hi All,


I am attempting to create a (fairly) simple web app using struts.I need
to create a table of questions with each question having radio
buttons (a range of numeric values) so the user can input and submit
their answers:


 question1        o o o o o o o o
 question2        o o o o o o o o
 ...
 My problem is that both the questions and the number of radio buttons
needs to be dynamic (based on what is currently in the database). I can
iterate through the questions and display them in the table but I am
unsure how to 'marry' up the radio buttons, and then retrieve the data
from the form when the user submits.
 Has anyone done anything similar to this ? Any example code or
suggestions would be gratefully recieved.




Regds

Priya



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org