struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: Implementing "cancel" on a form
Date Mon, 05 Oct 2015 06:13:51 GMT
2015-10-04 20:32 GMT+02:00 Christopher Schultz <>:
> 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

<s:submit method="cancel" value="Cancel"/>

+ 48 606 323 122

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message