Thanks for the suggestion. I had not expected, that there is no *simple*
solution for the problem, since it seems to me such an obvious issue.
If I do it with JavaScript, wouldn't the following strategy be simpler?
- I set up a hidden text field and a hidden button inside the form.
- My two (visible) buttons don't "belong" to the form, but have a
JavaScript function attached.
- Hence, the form has only one submit button, not two (and this button
is not visible)
- When the user clicks on one of the visible buttons, the Javascript
function places some value (according to which button has been clicked)
into the hidden text field, and calls form.submit()
- My controller doesn't do a check on the button, but on the hidden
textfield, to determine which button has been clicked.
What do you think about this way of doing it?