aspose file tools
The moose likes JSF and the fly likes Complex form fields and primitives Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Complex form fields and primitives" Watch "Complex form fields and primitives" New topic
Author

Complex form fields and primitives

Kev D'Arcy
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
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

Joined: Aug 25, 2004
Posts: 40
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

Joined: Jul 26, 2001
Posts: 75
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Complex form fields and primitives
 
Similar Threads
JSF Variable State: Odd Behavior
how does data from a jsf (xhtml) form get mapped to objects that are in the managed bean?
losing data when user enters form value with double quotes
JSF keeps displaying old values after Validation Phase fails (ignoring actionListeners settings)
enable jsf logging