I've got it working now. I'm using:

<c:forEach items="${MyForm.list}" var="entry " varStatus="status">
    <html:checkbox property="list[${status.count-1}].checked" />
</c:forEach>

-----Ursprüngliche Nachricht-----
Von: Vollnhofer Bernhard [mailto:bernhard.vollnho...@itsv.at] 
Gesendet: Donnerstag, 17. Juni 2010 15:58
An: user@struts.apache.org
Betreff: Iterating over a Collection and creating a <html:checkbox /> for each 
entry of it

Hi!

Is something like the following snippet possible to do?

<c:forEach items="${MyForm.list}" var="entry">
    <tr>
        <td>${entry.name}</td>
        <td>${entry.forced}</td>
        <html:checkbox property="entry.checked" />
    </tr>
</c:forEach>

Of course this code won't do it, but I hope you're getting my idea. I'd like to 
iterate over a collection and create a <html:checkbox /> for every item in it. 
This checkbox should set the "checked"-variable of an entry. Is such a feat 
possible?

Thank you

Bernhard



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

Reply via email to