• 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

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic