File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes selectMany vs. selectOne values... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "selectMany vs. selectOne values..." Watch "selectMany vs. selectOne values..." New topic

selectMany vs. selectOne values...

Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
(not so) deep thoughts.
In the case of a selectOneMenu component, I can specify an Integer as the value for the component, but for a selectManyListbox doing this is illegal as apparently the value list is always provided as a String array? If so, whyisit? I would have expected built in converters for such an obvious Object as an Integer? and other then casting back to integers is there a more transparent way to handle type handling?
I initialize the Select list for the multi select using the Integer as the value which is what I do in the single select as well, but they don't behave consistently.

I'm sure there must be an easy explanation why this is the case, it's just not obvious to me.

[SCJP 6]
[SCBCD in process]
I agree. Here's the link:
subject: selectMany vs. selectOne values...
It's not a secret anymore!