hmeh
asked on
Struts html:select java.lang.IllegalArgumentException argument type mismatch
Hi,
I am trying to submit a list of 'CustomerDetailsDTO' bean comprising attributes ie. name, address in 'CustomerDetailsForm' using the following code. My form CustomerDetailsForm.getLis tCustomerD etails() method returns me the list of POJOs of CustomerDetails dto
<html:select name="CustomerDetailsForm" property="listCustomerDeta ils" onchange="submit()"> <bean:define name="CustomerDetailsForm" property="listCustomerDeta ils" id="list2" /> <!-- html:optionsCollection value="address" label="address" name="CustomerDetailsForm" property="listCustomerDeta ils"/--> <html:options collection="list2" property="address" /> </html:select>
Everything goes fine and the page gets loaded but when i click on submit it gives me the exception.
java.lang.IllegalArgumentE xception: Cannot invoke forms.CustomerDetailsForm. setListCus tomerDetai ls - argument type mismatch at org.apache.commons.beanuti ls.Propert yUtilsBean .invokeMet hod(Proper tyUtilsBea n.java:177 8) at org.apache.commons.beanuti ls.Propert yUtilsBean .setSimple Property(P ropertyUti lsBean.jav a:1759)
I experimented the similar thing but there it was String[] as form field. In the above code i need to iterate through the pojo objects stored as elements in list.
I w'ld appreciate if somebody can help.
Thanks in advance
Hh m
I am trying to submit a list of 'CustomerDetailsDTO' bean comprising attributes ie. name, address in 'CustomerDetailsForm' using the following code. My form CustomerDetailsForm.getLis
<html:select name="CustomerDetailsForm"
Everything goes fine and the page gets loaded but when i click on submit it gives me the exception.
java.lang.IllegalArgumentE
I experimented the similar thing but there it was String[] as form field. In the above code i need to iterate through the pojo objects stored as elements in list.
I w'ld appreciate if somebody can help.
Thanks in advance
Hh m
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.