wood burning stoves*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

check boxes functionality in struts

surya gond
Greenhorn

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 ="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??

Thank You
Surya
[ September 28, 2004: Message edited by: surya gond ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: check boxes functionality in struts
 
Similar Threads
Javascript - Arraylist
multi select boxes
multibox functionality in struts
Display Check Boxes & Dropdowns in Struts with search results
multibox , resultSet, logic:iterate