• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Radio Button Binding to Array of Bean Property in Spring MVC 2.0

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

I am working on a code where it is required to bind the values from jsp using radio buttons in the bean array. In the code snippet below, if I use status.expression in the name attribute, then I am unable to group the radio buttons since every radio button will be having a different name and hence, I can select multiple radio buttons simultaneously since they don't belong to a group. If I use a constant name to group radio buttons, then I am unable to set the value of the property customerSelected using radio buttons.
On submitting the form, the CustomerInfo. customerSelected should be set true or false.

The code is as follows:

CustomerBean.java




CustomerInfo.java



customerInfo.jsp


sample-servlet.xml


Spring Version Being Used: 2.0

Please guide how can I achieve my target.

Thanks,
Vaibhav
 
See where your hand is? Not there. It's next to this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic