Thank you very much. This might help a lot.
One question remains: how do you resolve the actual value, which should be
displayed?
In the code-snipped you provided it works with cx:getValue(row, index)
Is this a special tag-library I can use too?



2007/9/10, Renzo Tomaselli <[EMAIL PROTECTED]>:
>
>  Andrew,
> c:forEach inside tr:table works perfectly, even when changing column
> layout from request to request. This topic has been discussed on this list
> sometime ago. Something like this:
>
>         <tr:table id="result"
>                 value="#{bean.data}"
>                 var="row"
>                 rows="#{bean.rowsPerPage}"
>                 varStatus="rowIndex"
>                 ....
>
>             <c:forEach var="column" items="#{bean.columnHeaders}"
> varStatus="iteration">
>                 <tr:column align="#{column.alignement}" noWrap="true">
>                     <f:facet name="header">
>                         <tr:outputText value="#{column.localizedLabel}"/>
>                     </f:facet>
>                     <c:if test="#{column.type == 0}">
>                         <tr:outputText value="#{cx:getValueAt(row,
> iteration.index)}" inlineStyle="padding-right: 10px"/>
>                     </c:if>
>                     <c:if test="#{column.type == 1}">
>                         <h:graphicImage value="#{cx:getValueAt(row,
> iteration.index)}"/>
>                     </c:if>
>                     <c:if test="#{column.type == 2}">
>                         <h:graphicImage value="#{cx:getValueAt(row,
> iteration.index)}" style="cursor: pointer;"
>                             onclick="Menu.onMouseDown(event, false,
> '#{container}',
>                                 'rowIndex', '#{row.hidden}', #{row.folder}
> ? 'folderMenu' : 'documentMenu', '#{row.disabled}');"
>                             onmouseout="Menu.onMouseOut(event, false,
> '#{container}', #{row.folder} ?  'folderMenu' : 'documentMenu');"/>
>                     </c:if>
>                     <c:if test="#{column.type == 3}">
>                         <cx:toolbarHolder bean="#{cx:getValueAt(row,
> iteration.index)}" onClick="Toolbar.onMouseDown('#{container}rowIndex',
> '#{row.hidden}');"/>
>                     </c:if>
>                 </tr:column>
>             </c:forEach>
>
> On the other hand, I'm not sure that tr:table accepts non-column children,
> such as tr:iterator. For example, ui:repeat wouldn't work.
>
> -- Renzo
>
> Andrew Robinson wrote:
>
> As a work around, if you are using facelets you could use c:forEach to
> generate new column components during the facelet build. I haven't
> used it yet, so not sure if it would work, but have you tried
> <tr:iterator>? If it works, the view may be something like:
>
> <tr:table value="#{rows}" ...>
>   <tr:iterator value="#{columns}" ...>
>     <tr:column>
>   </tr:iterator>
> </tr:table>
>
> Like I say, I have no idea if this would work, but worth a shot or at
> least a look in the code for the DesktopTableRenderer
>
> -A
>
> On 9/10/07, Martin Hinterndorfer <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> 
> wrote:
>
>  Hi everyone!
>
> I need to build a table with a variable amout of columns (with different
> headers and data types).
> We are planning to use trinidad, whereas trinidad has no <columns>-Tag, like
> tomahawk has.
> As far as I know, I can use the binding attribute to build the
> component-tree programatically,
> but it looks as if the table will become quite complex (buttons, validators,
> converters...), so this is not a
> very preferable approach.
>
> Does anybody have experience in mixing a trinidad application with the
> tomahawk <t:dataTable> and <t:columns> components?
>
> Any pros or cons?
>
> Thanks in advance!
>
> Martin Hinterndorfer
>
>

Reply via email to