aspose file tools*
The moose likes JSP and the fly likes javabeans and checkboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "javabeans and checkboxes" Watch "javabeans and checkboxes" New topic

javabeans and checkboxes

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I have a form with multiple check boxes. All of the checkboxes have the same name, but they have different values. The checkboxes represent various certifications that a person could have. Each checkbox also has an associated text field to enter the date. I would like to have these stored as arrays in a java bean, but I am not sure how to do this. Does anyone have any hints for me?

Matthew Phillips
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Do the associated textboxes have a name and are they all the same name? If they are you may be able to use getParameterValues() to retrieve the values into an array.

So much trouble in the world -- Bob Marley
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I was hoping for an easier way, but thanks.
I agree. Here's the link:
subject: javabeans and checkboxes
Similar Threads
Using same checkbox multiple times in an applet
Scolling the List to specific place when key is pressed
retrieving users' bookmarks
How to find Checkboxes?
html-multibox How can i make certain values checked