Let's say I already have a converter between a custom class Car
and String
.
Is there a way to elegantly make this
<f:viewParam name="mycars" value="#{mybean.cars}" converter="carConverter" />
work when mybean.cars
is a Set<Car>
or List<Car>
instead of just a single Car
, without having to write a custom converter between lists of cars and lists of strings? In other words, is there some feature of JSF that gets me out of having to parse "[Audi,BMW,VW]"
to ["Audi","BMW","VW"]
and then convert those one by one (and vice versa)?
I'd love it if there was something like
<f:viewParam name="mycars" value="#{mybean.cars}" converter="carConverter" list="true" />
Thanks!
PS: I've seen this post about converters and selectManyMenu, and in another context where I in fact use that, all works fine - selectManyMenu handles converting one by one. But right now I need viewParam to pass my list as an URL.