aspose file tools*
The moose likes Struts and the fly likes Multibox issue with DynaValidatorForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multibox issue with DynaValidatorForm" Watch "Multibox issue with DynaValidatorForm" New topic
Author

Multibox issue with DynaValidatorForm

Ramya Thyagarajan
Greenhorn

Joined: Jun 27, 2005
Posts: 15
Hi,

I have a JSP application which displays a set of multi boxes. Iam using struts DynaValidatorForm . If a value is checked and the form is submitted the multibox values are submitted correctly and the page refreshes and displays the checked multibox. But if a previously checked multibox is unchecked and saved, the value is not submitted to the form, the page refreshes and shows the checked box again.
Is there a way to override the reset method while using dynaValidatorForm??

Struts config entries
<form-property name="values" type="java.lang.String[]"/>

Jsp entries
<c:forEach var="dataValues" items="${dataValues}">
<html-el:multiboxproperty="values"value="${dataValues.id}"/>
<c ut value="${cardtype.id}" /></forEach>


please help..!!!

thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you're using one of the later versions of Struts, you can accomplish this simply by adding reset="true" to your form-property tag. Example:
<form-property name="values" type="java.lang.String[]" reset="true" />


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multibox issue with DynaValidatorForm