aspose file tools*
The moose likes Struts and the fly likes Struts 1 - Specified Keystroke to Trigger an Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1 - Specified Keystroke to Trigger an Action" Watch "Struts 1 - Specified Keystroke to Trigger an Action" New topic
Author

Struts 1 - Specified Keystroke to Trigger an Action

Jim Borland
Ranch Hand

Joined: Oct 26, 2009
Posts: 31
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

Joined: May 05, 2010
Posts: 213

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

Joined: Oct 26, 2009
Posts: 31
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Struts 1 - Specified Keystroke to Trigger an Action