aspose file tools*
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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionForm Does Not Pick Up the Values of the Selected Check Boxes
 
Similar Threads
How To Write validate() Instead of Using the validation.xml?
Display Check Boxes & Dropdowns in Struts with search results
data table,selectbooleancheckbox and row deleting
problem in html:image
org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.