• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do populate an array property in ActionForm

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using struts framework for my project.I have a jsp page which capture Name and skillset of candidate using checkbox.for all these checkbox im using the same name, so that i can get the values in a string array.

Problem im facing is when using struts how do i populate this string array in ActionForm.how will be the setter and getter method for this array.

Please help with this..

thanks in advance,
shameer
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shameer, as your question is specific to Struts hence you would definitely get better answer in Struts Forum.

Thanks.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by shameer ali:
Hi,

I am using struts framework for my project.I have a jsp page which capture Name and skillset of candidate using checkbox.for all these checkbox im using the same name, so that i can get the values in a string array.

Problem im facing is when using struts how do i populate this string array in ActionForm.how will be the setter and getter method for this array.

Please help with this..

thanks in advance,
shameer




You can use Struts indexed properties.

Regards,
Jass
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also use a single property of type String[] in your ActionForm.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic