I have a popup dialog with datatable and I want to have no focus in filter inputText fields. I want to have focus on button under this table. I tried this:
<p:focus id="focus" for="buttonFocus" context="dialog"/>
<p:dialog id="dialog" header="Выбор организации" widgetVar="vDialog" modal="true" resizable="false">
<p:dataTable
dblClickSelect="true"
id="table"
var="record"
value="#{myBean.tableList}"
rowKey="#{record.waId}"
filteredValue="#{myBean.filteredList}"
lazy="true"
>
<p:column headerText="Name" filterBy="#{recordp.name}" sortBy="#{recordp.name}">
#{record.name}
</p:column>
</p:dataTable>
<p:commandButton id="buttonFocus" actionListener="#{myBean.fill}"/>
</p:dialog>
it doesn't help. So, how to set focus on button in such situation?