wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: selectMany vs. selectOne values...
Similar Threads
if statement not correct?
How do I display two columns in my jcombobox?
Switch statement
KB question pg 611
maxlength for customer id column