• 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

Struts radio button problem

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I am new to struts . I have created some radio button in Html form using <html:radio/> my problem is that ,I just want to set the value of radio button on the basis of my bean.
I have a class say Employee and the type of employee is male/Female.Once I call the jsp page page from my Action class after updating the type of employee(M/F)then my jsp page should display the type of employee accordingly.If it is Men then readio button value should set to Male and of it is female the radion button value must be set to Female

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

I have not used radio buttons but here is a pointer to Dynamic radio buttons.
http://www-128.ibm.com/developerworks/java/library/j-sr4.html
http://javaboutique.internet.com/tutorials/strutsform/index-3.html
Hope it helps.

Regards,
Roshani
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the list of options is static, the you just need to use the html:radio tag. If your list of options is dynamic (database driven) then you can use code like this:


- Brent
 
reply
    Bookmark Topic Watch Topic
  • New Topic