This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic