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

Struts 1 - Specified Keystroke to Trigger an Action

 
Jim Borland
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an older application that uses Struts 1. Is it possible to designate a particular keystroke (say Alt-A) that will trigger an <action path="triggeredByKeystroke"....> in the struts-config.xml file? Normally these actions are initiated by a menu or using a "form action" in an HTML form. I would like my user to be able to utilize this keystroke at any time during their session and have it jump to this action. Any ideas for how I could do that? Thank you very much!

 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is any way you can specify it in struts, but you can do it with Javascript.'
I use http://www.openjs.com/scripts/events/keyboard_shortcuts/
 
Jim Borland
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard,

Thank you for pointing me to that Javascript website. I think creating a keyboard shortcut using Javascript will allow me to accomplish the goal I have established. Thanks again!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic