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.
You can't use EL in id attribute in this way. id attribute should be available during view build time but your EL is evaluated during view render time. This is too late, so in moment when id is checked it is empty.