Set Focus for Primefaces Component in Bean with WidgetVar with RequestContex Execute

前端 未结 4 1853
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 04:14

Is there a way to set my component focus after an function call to an other component with Primefaces RequestContex?

i tried:

RequestContex.getCurrentIns         


        
4条回答
  •  滥情空心
    2021-01-29 04:52

    You can use tag from primefaces, I used it for setting focus at run time as follows :

    .xhtml code:

    
    

    .java code:

    focusProperty="componentIDToSetFocus";
    

    don't forget to update the ID of tag

提交回复
热议问题