Tobago Demo

Menu

Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta
Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta

AccessKey

The accessKey attribute is available for many components like buttons, checkboxes or links. A component with this attribute is accessible by the given character. The character is not case sensitive.

Logging the accessKey can be configured by setting the category org.apache.myfaces.tobago.internal.util.AccessKeyLogger to log level "debug".

The usage of accesskeys is different for every OS and browser.
For example, in the Windows-Firefox, you have to press 'Alt + Shift + key'. In Chrome for Mac OS X it's only 'Control + Alt + key'. A complete listing can be found at the Mozilla Developer Network.

Tag Library Documentation: <tc:button/> | <tc:checkbox/> | <tc:link/> | <tc:label/>

Basics

The accesskey is set to 'a'. Notice, that the 'A' in the label of the button has an underscore.

<tc:button label="Button AccessKey" accessKey="a">

Invisible Key

The accesskey is '3'. Nothing is underlinded, because the value of the label doesn't contain a '3'.

<tc:button label="Button Three" accessKey="3">

Input

The accessKey is also available for input fields. An input field will get the focus after pressing the accesskey.

In

<tc:in label="Input" accessKey="i"/>

Text Area

<tc:textarea label="Textarea" accessKey="t"/>

Label

For the <tc:label/> tag an accesskey can be set in combination with the for attribute.

The following example show a label which is automatically bound to the input field after that.

<tc:label value="Label" accessKey="l" for="@auto"/> <tc:in/>
© 2005-2025 Apache Software Foundation, Licensed under the Apache License, Version 2.0.