Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf and shortcut keys (Hot Keys)

 
Balaji Kadam
Ranch Hand
Posts: 31
Hibernate Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to use hot keys on my page to implement it. I have tried this using accesskey attribute for command button , but this changes behaviour hen browser changes. Is there any way in jsf to perform this?

Thanks
Balaji
 
Bertjan Underhill
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Use jQuery for a cross browser solution.
See also this topic.
 
J Miller
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't believe that JSF has the built-in ability for hotkeys, at least not extensive support. For this you may have to use an additional framework. We use RichFaces on my team, and it has a hotkey tag that can do just about any hot keys you want. There are ways to do it in Javascript by capturing the onKeyDown event, finding what key it is, and sending that to a function to do whatever you want, but that's a pretty labor-intensive solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic