File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to bind a radio button value to a backing bean?

 
Dave Alvarado
Ranch Hand
Posts: 436
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using MyFaces 1.1.6 on JBoss 5.1. I'm having trouble binding radio button values to the backing bean. Here's how I defined my backing bean in my faces-config.xml file ...



and here's how I define the radio buttons on the JSF page ...



but in my backing bean Java code, the setter is never called, evidenced by the fact that I never see the line in the log file and when I return to the page there is no value filled in ...



Any ideas how to bind a value to a radio button? - Dave
 
Srini Mutpur
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The selectOneRadio element will be binded to the boolean datatype variables.
Change the specialNeeds datatype to boolean from String.

Srini
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic