This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes check boxes functionality in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "check boxes functionality in struts" Watch "check boxes functionality in struts" New topic

check boxes functionality in struts

surya gond

Joined: Sep 28, 2004
Posts: 2
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 also 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 ="">
<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>

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(
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(
at org.apache.commons.beanutils.PropertyUtils.setProperty(
at org.apache.commons.beanutils.BeanUtils.setProperty(
at org.apache.commons.beanutils.BeanUtils.populate(

Please let me know if any more information is needed??
Can some body please help me??

Thank You
[ September 28, 2004: Message edited by: surya gond ]
I agree. Here's the link:
subject: check boxes functionality in struts
It's not a secret anymore!