How to dynamically generate id in dataTable using ui:repeat tag

后端 未结 4 485
天命终不由人
天命终不由人 2021-01-07 03:23

I am using ui:repeat tag which render images. I have five images i want that on each iteration my image get ids like image1, image2, image3.... imagen. I tried this but it i

4条回答
  •  离开以前
    2021-01-07 04:02

    You can use EL in the id attribute, but it has to be available during view build time. The however runs during view render time, it will reuse the same to generate multiple HTML elements. It doesn't run during view build time, so the id remains image.

    If you replace by , then it'll work as you intented. The runs during view build time and it will generate multiple components which will then each get rendered only once.

    
    

提交回复
热议问题