[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: Problems Checking and Array of html:checkbox
From:       "Uday Chandra Karrothi" <udaykarrothi () gmail ! com>
Date:       2006-09-27 17:24:01
Message-ID: 7e71eaf40609271024q1c5ced36g76da5dddd00a6432 () mail ! gmail ! com
[Download RAW message or body]

Here is peace of code that i used .

It uses a strign array to set the checkboxes and then get the values(
in action form) selected as well.Have you tried using a multibox.

<logic:iterate id="apprEnEntry" name="ecnEntryEnList" indexId="apprIndex">
.....
    <td align="center" nowrap>&nbsp;&nbsp;<b><bean:write
name="apprEnEntry" property="label"/>&nbsp;&nbsp;</b></td>
      <td> <html:multibox property="selectedAssets">
	     <bean:write name="apprEnEntry" property="label"/>
	  </html:multibox>
	  </td>
   ...
 </logic:iterate>

selectedAssets is an array that you can populate with the values

so yeah
Basically try using multibox. I hope that will help you in settign and
getting the values of the checkboxes.

Thank you
Uday




On 9/27/06, yamilka vallejo ramos <yamilka84@gmail.com> wrote:
> Please I have and Array of html:checkbox, but that array it of Long[] and I
> don't kwon how to say checked = true
>
>
> <c:forEach items="${listadoTiposDonante}" var="tipoDon">
>
> <table>
> <tr>
> <td><html:checkbox property="tipoDonante" value="${tipoDon.id}"/></td>
> <td class="textoEtiquetasIzquierda"><c:out value="${tipoDon.etiqueta
> }"/></td>
> </tr>
> </table>
>
> </c:forEach>
>
> every element "tipoDon" of my list "listadoTiposDonante" has a boolean and I
> dont kwon how too work with that
>
> please if any boby could help me i will presure, thanks
>
>


-- 
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic