I'm trying to get struts to generate rows of data with an edit button beside 
each row.  When that edit button is pressed, the record it references will be 
loaded into an edit screen.

The record is referenced by its ID value, which I want to put into a hidden 
field.

I tried doing the following, but it simply places the literal *element.id" as 
the value of the hidden property rather than the value I thought it would 
reference.


<table>
    <tr>
        <th>ID</th>
    </tr>
    <tr>
        <th>Data</th>
    </tr>
    <logic:iterate id="element" name="testForm" property="testData">
        <tr>
            <td>
                <bean:write name="element" property="id"/>
            </td>
            <td>
                <bean:write name="element" property="data"/>
            </td>
            <td>
                <html:form action="do_view_test_data.do" name="testForm" 
type="com.somewhere.TestForm">
                    <html:hidden property="currentId" value="element.id"/>
                    <html:submit value="Edit"/>
                </html:form>
            </td>
        </tr>
    </logic:iterate>
</table>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to