Calling reset method in struts..
Hi All,
I am novice to struts programming.
I have written a program which takes a String variable as input and returns a ArrayList to populate a dropdown.
When i sumit the page first time it is working properly.But from second time onwards it is giving following Error.
exception
javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
root cause
java.lang.IllegalArgumentException: argument type mismatch
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
My JSP Contains:
<html:select name = "lookupForm" property = "business" styleClass="smallarial">
<html:options name = "lookupForm" property = "businessNames" labelName = "lookupForm" labelProperty = "businessNames"/>
</html:select>
where lookupForm is form bean name
and businessname is the property name (which has getter and setter method in FORM )
Getter and Setter Methods are :
public void setBusinessNames(ArrayList BusinessName) {
this.businessnames = BusinessName;
}
public ArrayList getBusinessNames() {
return(businessnames);
}
I am populating businessNames ArrayList in my action class and calling the Setter method as below :
LookupForm lookupForm = (LookupForm)form;
lookupForm.setBusinessNames(BusinessNames);
forgive me for poor terminology...
Please can any one help??
Thanks in anticipation..
Regards,
Srini