I am devoloping a web application using J2EE and Spring Roo as framework.
I want to create a form with two submit buttons:
- One for save and continue
Another for save and finish
<form action="mycontroller" method="post"> <input type="submit" value="Save and continue"/> <input type="submit" value="Save and finish"/> </form>
So I can choose to either store the data in the database and add more entries or to store the data and finish the process.
How can I check what submit button was clicked in the method of the controller that processes the action?
public class MyController {
void actionMethod(...) {
// check which submit was clicked
}
}