This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes ActionForm Does Not Pick Up the Values of the Selected Check Boxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionForm Does Not Pick Up the Values of the Selected Check Boxes" Watch "ActionForm Does Not Pick Up the Values of the Selected Check Boxes" New topic
Author

ActionForm Does Not Pick Up the Values of the Selected Check Boxes

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I have a web page that displays check boxes for user to make multiple selection:


For testing purpose, I made 6 selections of e-mail addresses among all check boxes displayed, Those 6 e-mail addresses are my friends'.

Then, the SelectRecipientForm.java extends the ActionForm class. In the ActionForm class, the multiple selection of check boxes by users are supposed to populate a String Array.

However, the values of the selected check boxes are not picked up. Here is the code of the SelectRecipientsForm.java:

Of course, I have this RecipientField.java:
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

There is bug in the check box tag of struts that if u have multiple checkboxes with same name .then if u have an arry inside form it will give to action but if u pupultae the same in form an dcome back to page then it wont populate all the check boxes it will populate only single check box
 
jQuery in Action, 2nd edition
 
subject: ActionForm Does Not Pick Up the Values of the Selected Check Boxes
 
Similar Threads
problem in html:image
org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
data table,selectbooleancheckbox and row deleting
Display Check Boxes & Dropdowns in Struts with search results
How To Write validate() Instead of Using the validation.xml?