Paul Benedict wrote:
What's the best way to accomplish this? I really dislike using the button text
to find the correct
dispatch so I don't want to use LookupDispatchAction. Is there another way,
such as using the
button's name to invoke the correct method? I thought I saw such a proposal in
the API docs but I
can no longer find it.
You basically have two options (unless you're willing to have a
dependency on Javascript): key off the localized button text, or give
each submit button a different name. I prefer the latter solution as I
think it's more robust:
<input type="submit" name="edit" value="Edit"/>
<input type="submit" name="delete" value="Delete"/>
...
if (request.getParameter("edit") != null) {
doEdit();
} else if (request.getParameter("delete") != null) {
doDelete();
}
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]