Is there a way to set my component focus after an function call to an other component with Primefaces RequestContex?
i tried:
RequestContex.getCurrentIns
Using PrimeFaces 6.1, for reasons unknown, I was unable to get the primefaces p:focus to work. So, I just implemented an onload JQuery function to set focus to a p:commandButton. For the onload call, put the jQuery nested function below in the 'body'. This is to be sure to override any other primefaces onload functions.
PrimeFaces creates widgetVar components for all of the primefaces components. Some features are available though the widgetVar such as disable or enable. But, I had to use the getJQ() function to obtain the jQuery object and used that object to set focus on the command button.