File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes IllegalArgumentException problem help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "IllegalArgumentException problem help" Watch "IllegalArgumentException problem help" New topic

IllegalArgumentException problem help

hoang ngo

Joined: Dec 03, 2007
Posts: 1

I wrote a formBean which has getter setter for an ArrayList.
my getter is:

public ArrayList getLdapVOList() {
return ldapVOList;

setter is:

public void ArrayList(ArrayList list){
this.ldapVOList = list;

in JSP:

im setting this arraylist as hidden value.

<input type="hidden" name="ldapVOList" value="<c ut value="${userValidationServerForm.ldapVOList}"/>">

and while submitting the form I am getting this exception:

java.lang.IllegalArgumentException: Cannot invoke com.intruvert.ui.struts.configure.admin.nac.userValidationServer.UserValidationServerForm.setLdapVOList - argument type mismatch
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(

much more......
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am pretty sure that you cannot populate List properties directly. I can remember on a page where I had to store a list of id values. I added methods like getIdsAsString() and setIdsAsString(). I had code in the get method that returned the id values as a delimited String and in the set method that parsed the delimited string and populated the list.

- Brent
wood burning stoves
subject: IllegalArgumentException problem help