I'm new to JSF and am having trouble with the rowkey
attribute of the DataTable.
It simply can not find the reference I put of my var
attribute. It's as if the name I put in var
only serves the components that are inside the DataTable ( <p:column>
). Here is the code:
<p:datatable var="p" value="#{controller.listaExemplo}"
selection="#{controller.linhaSelecionada}" selectionMode="single" rowkey="#{p.id}">
<p:column ....................
</p:datatable>
Even before I start the server to test, the same IDE already warns that the rowkey
line can not find the reference I put.
I searched a lot and did not find anyone with this same problem as mine, I looked in the firstfaces documentation and also did not find anything about it.
What should I do? What did I do wrong?