aspose file tools*
The moose likes JSF and the fly likes h:selectManyCheckbox always returns null after submit in JSF 1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "h:selectManyCheckbox always returns null after submit in JSF 1.1" Watch "h:selectManyCheckbox always returns null after submit in JSF 1.1" New topic
Author

h:selectManyCheckbox always returns null after submit in JSF 1.1

Thierry Collogne
Greenhorn

Joined: Oct 19, 2005
Posts: 16
Hi,

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).

This is the code of the jsp


This is the saveQuiz_action() that is called upon submitting



Does anyone have a clue what is wrong, because I can't figure it out.
I use BEA Workshop Studio 3.2.1 for development with JSDK 1.5 and for deployment I use Tomcat 5.5.20

Thank you very much.
[ November 25, 2006: Message edited by: Thierry Collogne ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:selectManyCheckbox always returns null after submit in JSF 1.1
 
Similar Threads
JSF(managed) beans, can not work with JPA
rendering each child t:tree node in seperate column in panel grid
selectManyCheckbox
commandLink not working in datatable+jsf2.0
Action Event