Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Hd Desai
Ranch Hand
Posts: 65
  • 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: 7306
45
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • 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