Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling reset method in struts..

843833Sep 28 2005
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2005
Added on Sep 28 2005
0 comments
104 views