Hi,
I defined a class Question which has some properties, such as id,type,etc.
public class Question implements Serializable {
private int id = -1;
private int number = -1;
private
String prompt = "";
private String type = "singlechoice";
private boolean mandatory = true;
private int scaleCount = 0;
private Vector choices = new Vector(); // option choice Strings
.... setXXX and getXXX methods in here ....
}
I defined another class Survey which has a Vector of the Question object.
public class Survey implements Serializable{
private int id;
...some other properties...
private Vector questions = new Vector(); // vector of Question
...setXXX and getXXX...
}
After i edit the data in the editsurvey.jsp and submit the form, i want to validate the data in validatesurvey.jsp.
I use
<
jsp:useBean id="survey" scope="request" class="com.mycompany.beans.Survey">
<jsp:setProperty name="survey" property="*" />
</jsp:useBean>
to get survey.
But i only get the int and string properties of survey, such as id, i can't get the vector of the question object.
How can i get the question object?
Thanks in advance.