This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic