I was wondering if there is a way to make an easy keyboard shortcut in my JSF page
each page has several buttons and I would like to be able to have a user press something like alt+a to activate a button called 'Add Report to Group'
in .net you just put an & before the letter you want to be the shortcut key, is there an option like this in JSF (apart from writing some javascript code which is what I found on the web)
Use the HTML-provided accesskey
attribute which is also mapped in <h:commandButton>
and <h:commandLink>
.
<h:commandButton value="Add" accesskey="a" action="#{bean.add}" />
This button can then be invoked by Alt+A or Shift+Alt+A, depending on the browser used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With