[thelist] how to set default submit button?

Johnson, Christopher (MTO) Christopher.Johnson at mto.gov.on.ca
Mon Jun 14 09:22:44 CDT 2004


I have a jsp page that has 12 submit buttons on it all associated with a
single form. This jsp page is put together using struts. Each button is
called 'action'. This can not be changed as struts (actually the Action
class that receives the form) uses the value of the action attribute to
determine how to process the form.

The problem is that the boss wants it so that if the person is in the form
and they hit enter (to process the form) the submit button that is selected
is actually the 11 button and not the first submit button on the page. (did
that make any sense?) 

Is there anyway to set a default submit button for a page? A few other
restrictions - no javascript is allowed to be used within the page so the
solution must be solely based on struts 1.0. (I realize that that probably
killed any hope of a solution, but them the rules)

Any idea?

chris


More information about the thelist mailing list