Only <tr:column> component tags.  <tr:forEach> isn't a component.
OK, not the clearest distinction in the world...

-- Adam


On 11/2/06, Daniel Hannum <[EMAIL PROTECTED]> wrote:
Really? I thought the table tag was very clear that you had to put <column> 
tags under it. Nothing else.

-----Original Message-----
From: Arnaud MERGEY [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 02, 2006 3:24 AM
To: [email protected]
Subject: Re: Table with dynamic number of columns

Hi,
 I don't use facelet, but "classic" JSP with Trinidad and tr:forEach
works fine for my pages with table and dynamic columns

try something like this

<tr:table value="#{formModel.rows}" var="row"
             id="tabTableList">
      <tr:forEach items="#{formModel.colList}" var="property">
                 <tr:column .....

Regards,
Arnaud

Daniel Hannum a écrit :
> 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
>
>
>


Reply via email to