Description of the problem:
I have a form which will display rows (Eg 100) with two columns ("vehicleDescription" and "leaseAmount" ). This form should display empty (unchecked) boxes for all the 100 rows on left side. This form has a "Delete" button. Whenever a user wants to delete some displayed rows, user selects check boxes associated with that rows. When the user clicks the Delete button, only those rows with checked boxes, should be retrieved in action class to be passed to delete method.
This is what I have in
jsp page
<logic:iterate id = "vehicleLeaseListrowid" name="vehicleLeaseList"
scope = "request" type ="com.lvm.vehicle.server.data.VehiclesLeaseValueBean">
<tr>
<td><html:multibox property="selections"><bean:write name="vehicleLeaseListrowid" property="vehicleId"/></html:multibox></td>
<td class="lblBlk1"><bean:write name = "vehicleLeaseListrowid" property = "vehicleDescription"/></td>
<td class="lblBlk1"><bean:write name = "vehicleLeaseListrowid" property = "leaseAmount"/></td>
</tr>
This is what I have in actionform
private
String[] selections = {};
public void setSelections(String[] selections){
this.selections = selections;
}
public String[] getSelections(){
return this.selections;
}
This is what I have in reset method
selections = null;
This is the exception error I am facing:
SRVE0026E: [
Servlet Error]-[BeanUtils.populate]: java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1650)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1545)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1574)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:919)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
Please let me know if any more information is needed??
Can some body please help me with a solution??
Thank You
[ December 10, 2005: Message edited by: Sam Mites ]