I'm trying to use Primefaces datatable with radiobutton-selection but the rowSelect event is not fired.
If I set selectionMode="single" in the datatable the event is fired, but the whole row is clickable.
<p:dataTable value="#{bean.items}" editable="true" var="item" selection="#{bean.selectedItem}" rowKey="#{item.id}">
<p:ajax event="rowSelect" listener="#{bean.doSomething}" update=":form:msgs" />
<p:column selectionMode="single" />
....
Is it possible to trigger the rowSelect-event when using radiobutton-selection?
Use the rowSelectRadio event
<p:ajax event="rowSelectRadio" listener="#{bean.doSomething}" update=":form:msgs" />
Check the PrimeFaces user guide. It lists all the ajax behaviour events for each component.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With