Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic