David Thielen wrote:
> I have a form with a submit, reset, and update button. How do I handle
control 
> of the update button (go to a different action)?

How is submit different from update?  And reset depends on how you do it...
A typical reset button on a form is client-side, it just puts the form back
the way it was when that page loaded.

LookupDispatchAction is good for this... Instead of (or in addition to) the
execute method, you would have methods for (as an example) create, update,
delete, (or whatever the submit buttons on your form are called).  The
getKeyMethodMap() method maps the text on the buttons to the method.

So in one action, you can handle all the things that need to be done on that
form.

As far as going to a different action, a form generally posts to it's own
action, but once the code there is executed you can forward wherever you
want.  Either use mapping.findForward() to look up one of the forwards in
struts-config.xml or instantiate your own ActionForward object and return
that.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

Reply via email to