Reputation: 11
im using primefaces, come from this Post without answer. Is it possible to select data from a row with RadioButton and also select by clicking on the row? when testing this code it works but RadioButton click didn't work
<p:dataTable id="dato" value="#{aGuiaBean.listUsuario}" var="data"
selectionMode="single" selection="#{aGuiaBean.usuarioSeleccionado}"
rowKey="#{data.idUsuario}" >
<p:column selectionMode="single" />
</p:dataTable>
And this way it only works by clicking on RadioButton and not on the row of the datatable
<p:dataTable id="dato" value="#{aGuiaBean.listUsuario}" var="data"
selection="#{aGuiaBean.usuarioSeleccionado}"
rowKey="#{data.idUsuario}" >
<p:column selectionMode="single" />
</p:dataTable>
Upvotes: 1
Views: 794
Reputation: 12019
This does not work out of the box and there is an open PrimeFaces ticket about the issue:
Issue: https://github.com/primefaces/primefaces/issues/4468
PR: https://github.com/primefaces/primefaces/pull/6090
The PR fixes it for 9.0
Upvotes: 1