My question is how can I dynamically assign arg0 in the validator?
Here's the senario:
I have a list of questions which I get from a database, and I would like to put back answers. In my form-bean I have a property called "lines", which contain lines with questions and answers. I use like this (pseudocode):
All the questions has to be answered, and I'm trying to do that with the validator framework (
struts 1.1), like this:
the properties file:
So, if a user doesn't answer a question, she will get an error saying "You must answer the question 'Question'" (that's what's in my properties file). However, I would like to use the "question" property of the bean which contains the actual question as arg0. So it would say
"You must answer the question 'Did you like the movie?'".
So maybe something like this instead (except it should work) :-)
Can this be done? Does anyone know how?