File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Hd Desai
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 6529
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is code I use, based on Ted Husted's:

To see if a certain button is selected, just invoke the isSelected() method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic