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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.