>From the struts multibox documentation: Renders an HTML <input> element of type checkbox, whose "checked" status is initialized based on whether the specified value matches one of the elements of the underlying property's array of current values. This element is useful when you have large numbers of checkboxes, and prefer to combine the values into a single array-valued property instead of multiple boolean properties. This tag is only valid when nested inside a form tag body.
WARNING: In order to correctly recognize cases where none of the associated checkboxes are selected, the ActionForm bean associated with this form must include a statement setting the corresponding array to zero length in the reset() method. The value to be returned to the server, if this checkbox is selected, must be defined by one of the following methods: * Specify a value attribute, whose contents will be used literally as the value to be returned. * Specify no value attribute, and the nested body content of this tag will be used as the value to be returned. so: from j2ee.lagnada.com/struts/multibox-exampl1.htm : <struts-html:form action="/multiboxExample1" method="get"> <b>Please select your subscriptions:</b><br><br> <struts-logic:iterate id="_bean" name="MultiboxExample1Form" property="multiboxValues"> <struts-html:multibox property="subscriptions" ><struts-bean:write name="_bean" property="code"/></struts-html:multibox> <struts-bean:write name="_bean" property="description"/><br> </struts-logic:iterate> <br><br> <struts-html:submit property="buttons.submit.name">Submit</struts-html:submit> </struts-html:form> > -----Original Message----- > From: Kedar Deshpande [mailto:[EMAIL PROTECTED] > Sent: Friday, December 17, 2004 2:10 PM > To: Struts Users Mailing List > Subject: Re: creating a for loop structure for multibox > > > bu then even if i pass the iterate tag a list of same lenth > of required > number of checkboxes, how would i make sure each checkbox has > a unique > 'value' value so that i know which ones are checked when the form is > sent to the action? > > > > Jim Barrows wrote: > > > > > > >>-----Original Message----- > >>From: Kedar Deshpande [mailto:[EMAIL PROTECTED] > >>Sent: Friday, December 17, 2004 1:52 PM > >>To: Struts Users Mailing List > >>Subject: Re: creating a for loop structure for multibox > >> > >> > >>i am currently using struts tags and cant find a proper > solution. it > >>would be better to have a simple struts code, otherwise i'll > >>try to use > >>the JSTL. > >> > >> > > > >Then you want the logic:iterate tag. > > > > > > > > > >>thank you > >>Kedar > >> > >>Jim Barrows wrote: > >> > >> > >> > >>> > >>> > >>> > >>> > >>>>-----Original Message----- > >>>>From: Kedar Deshpande [mailto:[EMAIL PROTECTED] > >>>>Sent: Friday, December 17, 2004 1:21 PM > >>>>To: [EMAIL PROTECTED] > >>>>Subject: creating a for loop structure for multibox > >>>> > >>>> > >>>>Could someone please post an example of using a 'for loop' > >>>>structure in > >>>> > >>>> > >>>> > >>>> > >>>Using JSTL, or Struts tag libs? > >>> > >>> > >>> > >>> > >>> > >>> > >>>>a JSP. i need to get the loop limit from the action and > then assign > >>>>individual 'value' values for a column of checkboxes so > that i know > >>>>which ones were selected and so that they can be set again > >>>>when viewing > >>>>the page. > >>>> > >>>>thanks > >>>> > >>>>------------------------------------------------------------ > >>>> > >>>> > >>--------- > >> > >> > >>>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>>For additional commands, e-mail: [EMAIL PROTECTED] > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>----------------------------------------------------------- > ---------- > >>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>------------------------------------------------------------ > --------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > >> > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]