- May 4, 2001
- 15,381
- 6
- 91
Here's my problem:
I must have two submit buttons in a jsp that map to two different action classes. However, both buttons must have access to the same data (i.e. a selected radio button) in a HTML form. As far as I know buttons in two different HTML forms do not see each other's "data". Thus I would assume I need to put both buttons in the same HTML form.
Since actions are defined at the HTML form level (i.e. <form action="/myAction"> ) and not the button level, can I check which button was pressed inside the perform() (or execute() or whatever) of my Action run (i.e. via the session or request or something)?
Any ideas or other work arounds?
Note1: I am a student working on a class-wide project, with our prof as the main project manager. Thus I have no priviledges to change any kinds of configs. (i.e. If Actions could be mapped to buttons)
Note2: We are NOT allowed to use javascript.
I must have two submit buttons in a jsp that map to two different action classes. However, both buttons must have access to the same data (i.e. a selected radio button) in a HTML form. As far as I know buttons in two different HTML forms do not see each other's "data". Thus I would assume I need to put both buttons in the same HTML form.
Since actions are defined at the HTML form level (i.e. <form action="/myAction"> ) and not the button level, can I check which button was pressed inside the perform() (or execute() or whatever) of my Action run (i.e. via the session or request or something)?
Any ideas or other work arounds?
Note1: I am a student working on a class-wide project, with our prof as the main project manager. Thus I have no priviledges to change any kinds of configs. (i.e. If Actions could be mapped to buttons)
Note2: We are NOT allowed to use javascript.