aspose file tools*
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
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: 5288
    
  10

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]
 
jQuery in Action, 2nd edition
 
subject: how to identify which button is pressed in struts!!!