aspose file tools*
The moose likes Struts and the fly likes How to save value of button pressed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to save value of button pressed?" Watch "How to save value of button pressed?" New topic
Author

How to save value of button pressed?

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Hi, I have two submit buttons on a JSP and want to be able to set the particular button the was presses and display it on the next page.
This is what have so far:

<html:submit value="Modify" disabled="true" property="Modify">Modify</html:submit>
<html:submit value="Add" disabled="false" property="Add">Add New</html:submit>


I tried creating form bean attributes namded "modify" and "add", but those do not seem to be getting set with the value of the button presses.
Any ideas?
Neela Sathesh
Ranch Hand

Joined: Jan 19, 2004
Posts: 50
Hi,

Why can't you use the same property for both the Button.Then you have a property in the form in which you will be able to get the value of the form.


With regards,<br />Neela.N
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Oh good idea. That worked. Thanks!
 
 
subject: How to save value of button pressed?