The situation:
I have a JavaServer Faces page and a session-scoped managed bean that has two ArrayList
properties: one for holdi
The generic type information of List<Integer>
is lost during runtime and therefore JSF/EL who sees only List
is not able to identify that the generic type is Integer
and assumes it to be default String
(as that's the default type of the underlying HttpServletRequest#getParameter()
call during apply request values phase).
You need either to explicitly specify a Converter
, you can use JSF builtin IntegerConverter:
<h:selectManyListbox ... converter="javax.faces.Integer">
or just to use Integer[]
instead, whose type information is clearly known during runtime:
private Integer[] selection;