struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piers Dunleavy" <>
Subject iteration to create dynamic form
Date Thu, 26 Jun 2003 06:31:58 GMT
I have a <logic:iterate> tag which is supposed to create a dynamic form, filled with
a checkbox for every object in a collection. (The checkbox is an option to delete one of those
records from the database.) The form itself is a Map-Backed Action form with two methods (public
void setValue(String key, Object value) and public Object getValue(String key)). 

<logic:iterate id="record" name="user" property="siteSection.newRecords">

(dataobjects.Record) l = (dataobjects.Record)pageContext.findAttribute("record");
String name= new String("value(" + r.getID()+")");
<tr" height="30">
<td align="center">
<html:checkbox value="off" property="<%=name%>" onclick="CheckMBRow(this)"/>
</td> <td> ..other stuff describing the record..</td>

Is there a way in Struts to do this without calling the "record" object from the pageContext?
Can't I get the <html:checkbox> tag to recognize the 'record' bean directly without
using that scriptlet and then creating a String to set the appropriate mapped value? 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message