Hi,
Is it possible to create a tr:table with a dynamic number of columns? I
have a table backed by a list of objects A, in the typical way. Each row
pulls out some fixed properties of A, but A also contains a list of B's.
I want each of the B's to be some additional columns. Don't worry, I can
guarantee that all the A's have the same number of B's, so each row of
the table will have the same number of columns, but I don't know what
that number is before runtime.
I tried the iterator tag, but you aren't allowed to put it directly
under <table>. I tried making a column tag that contained an iterator
and N sub-columns. The results were unpredictable and I got a
ArrayIndexOutOfBounds. Before I looked too deeply into that, maybe I'm
just not supposed to do that. I don't know.
Another option might be to put the maximum number of columns in the
table, and set rendered=false for the ones I won't use. But that's a lot
for EL. The second column would have rendered="#{row.list.size() >= 2}",
which I don't even think is allowed in EL.
Options?
Thanks for any help you can offer.
Dan