Creating Keyboard shortcuts in ADF

For default ADF Faces provides a accelerator for page level components. But this is not customized.

The menu components like commandMenuItem have the accelerator attribute (Ctrl+YourKey).

Another possibility is the accessKey attribute. This attribute moves the focus to the components and in the case of button or links executes the action.

The problem is that the interpretation of accessKey depends of browser.

For example:

  • Firefox interprets the acceskey like Alt+Shift+yourAcKey.
  • Explorer Alt+yourAcKey.

Firefox always sets focus and executes the action in all the components but IE in some components like in the commandToolbarButton only sets a focus.

Another way is create your own shortcuts through JavaScript functions.

Anuncios