You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heligon Sandra <sa...@thomson.net> on 2003/04/08 09:49:17 UTC

HELP!: html:multibox reset button

	I would like to do the same thing as in the test html:multibox
example.

	http://dizzy.stup.ac.ru/struts-exercise-taglib/html-multibox.jsp

	I have a list of check-boxes and I would like to implement a button
Reset
	that allows to uncheck all the check-boxes.
	I read in previous messages that we have to implement the reset()
method but
	I don't have any class I use a DynaValidatorForm.

	My DynavalidatorForm:
	
	 <form-bean name="myForm" dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
	    <form-property name="employees" type="java.util.ArrayList" />
	    <form-property name="selected" type="java.lang.String[]" />
	 </form-bean>

	My JSP page:

	<html:form action="/myProcessAction.do" method="GET">
		<table width="100%" border="0" cellspacing="0"
cellpadding="0">
		<tr bgcolor="#FFCC00">
		    <th align=left width="10%"><bean:message
key="label.title.select"/></th>
		</tr>
		<logic:iterate name="myForm" id="employees"
property="employees" type="com.employee" offset="offset"
length="length">
		<tr bgcolor="#EBEBEB">
			<td bgcolor="#EBEBEB" width="10%">
			      <html:multibox name="myForm"
property="selected" value="on"></html:multibox>
			</td>
		</tr>
		</logic:iterate>
		</table>

		<table width="100%" border="0" cellspacing="0"
cellpadding="0">
		<tr>
		    défintion of the reset button ?
		<tr>
		</table>
	</html:form>

	I will also wish to make the opposite function, have a button to
check all check boxes.
	I posted many messages on this subject but nobody never answered me
I hope that 
	somebody will be sensitive to my call because I already lost much
time on this subject. 
	Thanks a lot in advance


	

----------------------------------------------------------------------------

As of February 12th, 2003 Thomson unifies its email addresses on a worldwide
basis. 
Please note my new email address: sandra.heligon@thomson.net 

http://www.thomson.net/