I want to have a class on a div, if it is the last one in my repeat.
I have now:
<ui:repeat value="#{myCollection}" var="item" varStatus="status">
<div class="last">#{item.text}</div>
</ui:repeat>
but I want the class last just on the last div…
#{status.last}
is true, if it is the last div. But how can I get the class to the div?
Solution 1 if you may afford not to be compatible with IE8 :
Don’t do this in JSF, this breaks the purpose of having a CSS to isolate the style from the data.
You may do this in your CSS file :
Solution 2 :