I try to get selected row index from in my bean.
In backing bean i use listener
public void updateCurrent()
{
int rowIndex = dataTable.getRowIndex();
...
}
but i always get -1 in rowIndex
in p:dataTable i try process my DataTable and call listener on select row
<p:ajax event="rowSelect" listener="#{locationBean.updateCurrent}"
process=":mainTab:mainLocationForm:mainLocationTable"/>
PrimeFaces version - 3.4
Please help to get selected row index. Thanks.
dataTable
in your xhtml like this:<p:dataTable binding="#{yourBean.myDataTable}" />
? – Jens:mainTab:mainLocationForm:mainLocationTable
– esedingetRowIndex()
says this: "This property is not enabled for value binding expressions." – Jens