I am displaying a collection of beans in a form with <logic:iterate>.  Here is the loop
    <html:form action="updateservices.do" name="serviceForm"
               type="com.instanton.secureex.web.form.ServiceForm">
        <logic:iterate id="service" name="services">
            <TR>
                <TD align="center">
                <html:text name="service" property="name"/>
                </TD>
 
                <TD align="center">
                <html:checkbox name="service" property="authenticated"/>
                </TD>
 
                <TD align = "center">
                <html:checkbox name="service" property="encrypted"/>
                </TD>
            </TR>
        </logic:iterate>
 
        <TR>
            <TD></TD><TD></TD>
            <TD align="right">
                <html:submit>
                    <bean:message key="main.update"/>
                </html:submit>
            </TD>
        </TR>
    </html:form>
 
Note I am not using any getter setter methods from the form itself.  What I would like to do is add a checkbox for each row for a delete and an update button.  The update would rip through the collection and update the appropriate rows and delete the row if the delete button was checked.  Seems pretty standard.  I am not sure how to go about doing this.  In my action, how do I get a hold of my original collection?  How do I get a hold of the values of the checkboxes?  How do I use the ActionForm in this case when I am not reading data from it?  Would I use the ActionForm to pass the checkbox and updated items to the action class?  How are getter/setter methods handled when I have a collection?
 
    --confused
 
Michael R. Thompson
http://www.instanton.com
512.439.3815

Reply via email to