How do I collect all selected values from UISelectMany components such as h:selectManyListbox, h:selectManyMenu, h:selectManyCheckbox, p:selectManyListbox, p:selectManyMenu, p:selectManyCheckbox, etc in backing bean?
If someone can help with an example, that would really help.
As with every other input component, just bind its
value
attribute with a managed bean property. It can map to aList
or an array of the same value type as you've used inf:selectItem(s)
. If the value type is not one of the standard EL types (String
,Number
orBoolean
), then you have to supply aConverter
as well.Here's an example with a value type of
String
:with
See also:
selectOneMenu
wiki page