Having struggled for a couple of days I finally gave up and decided to ask for help.
I use Seam with Facelets. What I want is to show a list of entities in a table cell i.e a single cell may contain a comma-separted list.
Let's say I have two entity types: Item and Subitem. An instance of type Item may have a number of Subitems. In my case the relation between these two entity types is many-to-many.
So if I have Item1 with three subitems: Subitem1, Subitem2 and Subitem3, I want to see something like this:
Please note that I don't want a comma after the last subitem in a cell (Subitem3 in this case). Nothing special, an obvious requierment, isn't it?
The first thing I tried was ui:repeat:
Everything's fine except for the fact that there is a nasty comma after the last subitem. This made me try c:forEach tag:
Unfortunately this code won't work! It just leaves my favorite column empty. It seams that c:forEach do not see variable item. I then tried to find a way to add the conditional logic to ui:repeat, but haven't managed to find anything like c:forEach's 'varStatus'.