Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Complex form fields and primitives  RSS feed

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just have a quick query about form fields and how JSF handles converting
values. From the testing I've done, using primitives in a backing bean and
trying to assign them values from form fields appears to be quite haphazard.
Using text fields or input boxes is quite straight forward and the conversion
and validation seems to work well, but when I start using radio buttons
and drop-down menus, the conversion fails. It seems that only String values
will work from these kinds of input fields, even the wrapper classes
(java.lang.Integer etc) fail. Is this just a know limitation of JSF or am I
doing something stupid....
 
Kumar Saravanan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kev,

As far as I know, MyFaces supports only the String as data type in selectManyCheckBox. Let me know which RI you are using?

Thanks,
Kumar
 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Suns RI. Radio buttons and drop downs only seem to support Strings.
How do you find MyFaces? It wasn't very stable the last time I used it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!