Set id of a component within JSF dataTable to value from current item in the array

前端 未结 2 2005
萌比男神i
萌比男神i 2020-12-14 10:22

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.

2条回答
  •  隐瞒了意图╮
    2020-12-14 11:06

    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.

提交回复
热议问题