I think one option is to use the <trh:xxx> components, like
layoutTable/cellFormat and use forEach/iterate
to generate those columns.

Greetings,
Matthias

On Tue, Jun 24, 2008 at 5:30 AM, Paul Spencer <[EMAIL PROTECTED]> wrote:
> Joris,
> I am using the Tomahawk component, <t:columns>, inside a <t:dataTable>.  The
> table is inside a Trinidad component.  I do not know the answer to you
> question.
>
> I suggest you pose the question in a new post with an appropriate subject.
>
> Paul Spencer
>
>
>  Joris Kimpe wrote:
>>
>> Thanks Paul,
>>
>> this seems to be what I need...  However, I implemented it now using a
>> trinidad table.  The Trinidad table has an attribute varStatus.  Is there
>> something simular in the Tobago dataTable?
>>
>> Joris
>>
>>
>>
>> Paul Spencer-3 wrote:
>>>
>>> Joris,
>>> I am doing something similar using <t:columns>.  Their is documentation
>>> on the wiki when this component was in the sandbox [1].
>>>
>>> Paul Spencer
>>>
>>> [1]http://wiki.apache.org/myfaces/Dynamic_Columns?highlight=(columns)
>>>
>>> Joris Kimpe wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I have a number of counters that I want to show as nested columns.  This
>>>> will look something like this:
>>>>
>>>> |                  |              Counters                 |
>>>> |      Date      |  AA  |  BB  |  CC  |  DD  |  EE  |
>>>> |-------------|------------------------------ |
>>>> | 22/06/2008  |  0    |   20 |  10  |   0    | 10   |
>>>> | 22/06/2008  |  0    |   21 |  12  |   0    | 12   |
>>>> | 23/06/2008  |  2    |   23 |  15  |  10   | 10   |
>>>> ...
>>>>
>>>>
>>>> In my backing bean I have a List of Objects.  For all objects in my list
>>>> I
>>>> want to show a column , but how do I have to dynamically create group
>>>> columns?  I already tried this:
>>>>
>>>>        <tr:table binding="#{backingBean.overviewTable}"
>>>> value="#{backingBean.dataModel}" var="row">
>>>>                <tr:column headerText="Date">
>>>>                        <tr:outputText value="#{row.date}"
>>>> converter="DateConverter"/>
>>>>                </tr:column>
>>>>                <tr:column headerText="Counters">
>>>>                        <c:forEach items="#{row.counters}" var="counter">
>>>>                                <tr:column
>>>> headerText="#{counter.type.id}">
>>>>                                        <tr:outputText
>>>> value="#{counter.valueString}"/>
>>>>                                </c:column>
>>>>
>>>>                        </tr:forEach>
>>>>                </tr:column>
>>>>        </tr:table>
>>>>
>>>> The result of the code above, is an empty column under "Counters".
>>>>  Can't
>>>> I
>>>> use c:forEach?  Or is there something else wrong?
>>>>
>>>> If I use tr:iterator instead of c:forEach, I get an
>>>> IndexOutOfBoundsException (on position 5).  But this is something I
>>>> don't
>>>> get.  This iterator isn't supposed to iterate out of the bounds...  Or
>>>> is
>>>> it?
>>>>
>>>> Using tr:forEach isn't a solution either.  This results in an exception
>>>> (noClassDefFoundError
>>>>  javax/servlet/jsp/jstl/core/IndexedValueExpression
>>>> )
>>>> because it needs the jstl 1.2 library and on this moment I'm only
>>>> allowed
>>>> to
>>>> use jstl 1.1.2...
>>>>
>>>> Hope someone can help me (or point me to the correct direction) because
>>>> I'm
>>>> searching a couple of days now...  Wish there was an easy solution!
>>>>
>>>> Joris
>>>
>>>
>>
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Reply via email to