2015-10-04 20:32 GMT+02:00 Christopher Schultz <ch...@christopherschultz.net>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > All, > > I've got a form which works nicely, and I'd like to add a "cancel" > button to it. Right now, I have an Action class that implements no > Struts2-defined interfaces... I just have the typical execute-style > methods edit() and save(). I'd like to call cancel() when the user > presses the cancel button. > > I've been both reading "Struts 2 in Action" and doing a bit of > Googling, but it's tough to find resources on implementing "cancel". > > I did see something about using a button with a name like > "redirect-action:index" but it wasn't clear when that redirection > takes place... before or after the action is invoked. > > What am I missing?
You can use DMI (you must enable it first) and then you can use one of those solution https://struts.apache.org/docs/html-form-buttons-howto.html https://struts.apache.org/docs/multiple-submit-buttons.html basically: <s:submit method="cancel" value="Cancel"/> Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org