p:selectOneMenu doesn't receive focus on tab key navigation

隐身守侯 提交于 2019-12-13 00:40:38

问题


I have a form with <p:inputText> and <p:selectOneMenu> components next to each other. When the focus is on the input text and I press the tab key in order to navigate to select one menu by keyboard, then the focus is lost. I don't see which component is focused.

How can I get the focus on the select one menu when I tab into it?


回答1:


You need to use the tabindex property of <p:inputText> and <p:selectOneMenu>, as explained in the documentation.




回答2:


Using the tabindex property makes it possible to navigate between <p:inputText> and <p:selectOneMenu>. What worked for me was to see set the tabindex in <p:inputText> to n and n+1 in <p:selectOneMenu>. I used n = 90.



来源:https://stackoverflow.com/questions/19033979/pselectonemenu-doesnt-receive-focus-on-tab-key-navigation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!