The submit button in the first code snippet I posted should have read:

        <html:submit>Modify</html:submit>

instead of:
                <html:submit property="username">Modify
                </html:submit>

I had used the "property" attribute when experimenting with usernames in the
button.

David

-----Original Message-----
From: DHarty [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: html action links


This is really a two part question.

I have an iterative loop that displays a list users that are stored in
Action Forms.  The idea is that when the button (or link) next to the item
is selected, the user will be allowed to make modifications to the selected
form:

  <logic:iterate id="user" name="SearchForm" property="result">
  <tr>
        <html:form action="/usermodify">
        <td align="center">
                <bean:write name="user" property="username"/>
        </td>
        <td align="center">
                <html:submit property="username">Modify
                </html:submit>
        </td>
        </html:form>
  </tr>
  </logic:iterate>

Where "result" is a vector of ActionForms.

Currently, when the "Modify" button is selected, the appropriate action
class is called, but the ActionForm is reset.

I know I could add a field to the submit button, i.e:

        <html:submit property="username">Modify <bean:write
property="username"/></html:submit>

and then have the action class look up the user in hte database again, but I
would rather not.

I was considering using an html link instead of a button, but was unsure how
to proceed.
Ideally, I would like to use an html link, while retaining the existing form
(without having to look it up again).

Any thoughts or comments would be appreciated.

Thnxs

David

Reply via email to