Deselecting a table row in PrimeFaces

java, jsf, primefaces

Solution

To trigger rowUnselect, once a row is selected, hold control key and click on the row again. That way the row gets unselected, and the ajax event is executed.

Possibles values for selectionMode attribute are "single" and "multiple".

Problem

I have a table like this: ``` <p:dataTable id="table" selectionMode="single"> ... <p:ajax event="rowSelect" listener="#{myBean.onRowSelect}" update="someStuff"/> <p:ajax event="rowUnselect" listener="#{myBean.onRowUnselect}" update="otherStuff"/> </p:dataTable> ``` Does anyone know how to trigger the `rowUnselect` event on the UI ? Another thing, what are the possible values of the `selectionMode` attribute ? They don't seem to be in the documentation. Thanks,

Original source