I´m trying to create a method that receive a list of parameters from a multiselection checkbox html component. But, it just doesn´t work.
I've test:
@POST..
.. myMethod(@FormParam String [] myCheckboxAttribute)
.. myMethod(@FormParam List<String> myCheckboxAttribute)
None of those works well (the last one (list) come with just the first checkbox checked but the others no).
Some idea?
You have to specify the name of the form parameter in the @FormParam annotation.
Here is an example that works for me:
HTML form:
Submitting the form with B and C checked prints out:
I also verified in the debugger that the list is populated with 2 strings, b and c.