Reputation: 97
I have a rich faces datatable. I want to display a list of strings in a single cell as comma(or semicolon) seperated values. Is there a way in richfaces to do this?
Upvotes: 2
Views: 2380
Reputation: 1108632
Just use <ui:repeat>
. You can use varStatus
to reference an iteration status instance which has among others a boolean last
property which is helpful in omitting the comma from the last item.
<ui:repeat value="#{listOfStrings}" var="string" varStatus="loop">
#{string}#{not loop.last ? ', ' : ''}
</ui:repeat>
Upvotes: 9