h:selectManyCheckbox always returns null after submit in JSF 1.1
posted 9 years ago
I am developing a small application in JSF. It is some sort of multiple choice quiz. So, each question has 5 possible answers. It is possible that more that one answer is correct, so it has to be possible to select more that 1 answer. To understand it, you need to know that each question belongs to a category. So, this is the structure.
CategoryDTO has a list of QuestionDTO and in this QuestionDTO there is a String that should contain the selectedAnswers.
Therefore I used a h:selectManyCheckbox. The page renders ok, but when I submit my answers, the list is null (I means the String selectedAnswers of the QuestionDTO).