I'm having a datatable where I would like to set the id of each row to the id of the current item (object that has an id field) in the array that builds the table.
Example:
<h:dataTable
value="#{bean.list}"
var="item">
<h:column>
<h:outputText id="#{item.id}" .... />
</h:column>
</h:dataTable>
This doesn't work as I get: javax.servlet.ServletException: Empty id attribute is not allowed
.
Is it not possible to set the id this way due to how JSF builds its id's, or am I doing something wrong?