Where myQuestions is a List of Question Objects. upon submission this gives me an error
Since this is a list of question objects that you are trying to fill a question object with a string. Check if you have the converter defined for the hidden line in the question, as well as the one specified in the xwork-conversion.properties file
System.out.println(myQuestions); prints an empty list.
instead of this
private List<Question> myQuestions = new ArrayList<Question>();
do it
private List<Question> myQuestions;
When you submit the form, a new object of your Action class is created, and your instance variable "myQuestions" gets reinitialized with each view.
Hope this helps :)
source share