can't use the “end” property of JSF 2.0 repeat tag's varStatus

后端 未结 1 930
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-16 23:36

I\'m using the repeat tag of JSF 2.0 to loop through a list of objects and display some of their properties. I want to use the varStatus attribute

相关标签:
1条回答
  • 2021-01-17 00:00

    The end is only used when you set the size attribute.

    <ui:repeat ... size="#{fn:length(objectList)}">
    

    Alternatively, you can also just use it directly.

    Item #{repeatStatus.index + 1} of #{fn:length(objectList)}
    

    By the way, the boolean comparison in #{false == repeatStatus.last} is ugly. It returns a boolean already; if you want to negate it, rather use #{not repeatStatus.last}.

    0 讨论(0)
提交回复
热议问题