This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Struts and the fly likes how to identify which button is pressed in struts!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to identify which button is pressed in struts!!!" Watch "how to identify which button is pressed in struts!!!" New topic
Author

how to identify which button is pressed in struts!!!

Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
hello,
i am building a web application in which i have 3 buttons for edit,save and cancel.
now i am using struts ....
i have images as buttons...so the problem is i m not able to identify which button is pressed....i have seen documentation of struts for image tag,it gives X and Y co-ordiante but thats not correct solution because depending on resolution my X and Y coordinate can change...
and one another contsratint is i don;t have to use JavaScript
so please help me..i am stuck at this point...
thank you.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 6264
    
  15

This is code I use, based on Ted Husted's:

To see if a certain button is selected, just invoke the isSelected() method.


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to identify which button is pressed in struts!!!
 
jQuery in Action, 3rd edition