Most things in
struts have come pretty easy for me, but <html:select> and <html:options> are really giving me fits.
Here's my code:
A CourseBean extends ValidatorForm and it has two members (courseId, courseName) with associated getters/setters.
CourseBean is defined in struts-config.xml and is mapped to /loadCourse.do.
When this page loads, if I have an EMPTY ArrayList stored in a session attribute keyed by "courses". The page loads a blank listbox and displays fine.
When the "courses" ArrayList is filled with "CourseBean" objects that I would like displayed, I get the following exception:
org.apache.jasper.JasperException: No name specified
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
<snip>
root cause
java.lang.IllegalArgumentException: No name specified
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:721)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:240)
<snip>
What am I doing wrong?
Thanks in advance!
Aaron
[ June 29, 2005: Message edited by: Aaron Wilt ]
[ June 29, 2005: Message edited by: Aaron Wilt ]