Looking for a way to solve this problem, I found several blogposts with a solution. Most of them are based on the usage of a clientListener of type 'keydown' on the LOV item. The clientListener calls a JavaScript function that checks the key pressed, and places the focus on the next input field when the tab-key is pressed. The challenge in these solutions is to determine what the next focus field should be. Finding the next item based on hardcoded id's isn't an elegant solution.
If we could influence the way the HTML was written by ADF Faces, the solution would be easy. The only thing we really need, is to set the HTML tabIndex attribute of the LOV icon to -1. This tells the browser to skip the icon from the tab sequence. However the af:inputListOfValues item does not support this feature declaratively.
In the following I will explain how the tabIndex of the LOV icon can be set to -1. What we need is a clientListener and some JavaScript.
Javascript:
function setLovTabIndex(event) {
var component = event.getSource();
var lovButtonId = component.getClientId() + '::lovIconId';
// We have to find the button using the document because finding it through Adf.Page.findComponent does not
// work. The icon is not a separate ADF component.
var lovButton = document.getElementById(lovButtonId);
// This is the trick: set tabindex to -1
lovButton.tabIndex = - 1;
// Remove the eventlistener to prevent action from being performed again. Not really a must, but cleaner.
// However this does not work in conjunction with the autosuggest feature on the lov-item.
// In that case the listener is not removed.
component.removeEventListener("focus", setLovTabIndex, false);
//event is handled on the client. Server does not need
//to be notified
event.cancel()
}
This JavaScript should be included in a JavaScript library that is part of your application.
The next step is to add an af:clientListener to the af:inputListOfValues item:
<af:inputListOfValues id="employeesManagerId" ...>
<f:validator binding="#{bindings.EmployeesManagerId.validator}"/>
<af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesManagerId.format}"/>
<af:clientListener method="setLovTabIndex" type="focus"/>
</af:inputListOfValues>