I have my datatable with selections and ajax event:
<p:dataTable id="targetTable" value="#{targetController.targetList}" var="target emptyMessage="No result found with given criteria"
widgetVar="targetTable" paginator="true" rows="20" selection="#{targetController.editTarget}" selectionMode="single" paginatorPosition="top"
rowsPerPageTemplate="5,20,50" lazy="true"
>
<p:ajax event="rowSelect" listener="#{targetController.editTarget}" />
... columns ..
</p:dataTable>
And I added column with button like this:
<p:column width="100"><f:facet name="header">#{i.m['Changes history']}</f:facet>
<p:commandButton id="showChangesHistory" value="#{i.m['Show Changes']}" onclick="return false;" type="button" />
</p:column>
My problem is that targetController.editTarget
activates on button click.
Primefaces version: 3.3.1