Hi,
I'm using database top populate a select box in the
JSP. First time when the JSP is called, the select box is populated correctly.
I use the following code for this:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
<bean
efine id="selProject" name="projectsForm" property="selProject" type="java.util.ArrayList"/>
<html:select property="selProject" size="10" style="width:180px" onchange="projectsOnChange();">
<html
ptions collection="selProject" property="value" labelProperty="label" />
</html:select>
-----------------------------------------------------------------------------------------------------------------------------------------------------------
"selProject" is an attribute in my form bean which is of type ArrayList. This array list contains objects of type
OptionLabelValue.
When i click the save button the following error occurs.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
exception
javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
...........
root cause
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
...........
-----------------------------------------------------------------------------------------------------------------------------------------------------------
All my form beans are in request scope.
Any suggestions please.
regards,
Dinesh