p:commandButton onfocus not working
<p>In my project there are 8 text boxes and a command button. When I press the command button <code>onfocus</code> attribute is not working. So I tried to use <code>p:focus</code> which either did not work as expected.</p>

<pre><code>&lt;p:commandButton value="Test1" action="#{test.testAction1}" update="mainPanel"&gt;
    &lt;p:focus for="textField"/&gt;
&lt;/p:commandButton&gt;
</code></pre>

<p>Do I need <code>p:commandButton</code>'s attribute <code>onfocus</code> to focus a specific component?</p>