Hi,

The crosstable component makes it possible to have a variable count of
columns in a datatable.

The component is working like this:

<x:dataTable value="#{data.rows}" var="row" >
  <!-- just a column -->
  <h:column>
    <f:facet name="header">
        <h:outputText value="fixed column" />
    </f:facet>
    <h:outputText value="#{row.attributeName}" />
  </h:column>
  <!-- new columns component renders a column for each element in
data.columns -->
  <x:columns value="#{data.columns}" var="column">
    <f:facet name="header">
        <!-- row is not available! -->
        <h:outputText value="#{column.label}" />
    </f:facet>
    <!-- row is also available -->
    <h:outputText value="#{data.columnValue}" />
    <f:facet name="footer">
        <!-- row is not available! -->
        <h:outputText value="#{column.footer}" />
    </f:facet>
  </x:columns>
</x:dataTable>

The x:columns component is based on UIData. The parent datatable must
have a fixed count of columns so it is not possible to use <x:columns
value="#{row.columns}" var="column">.
To get the value for the column in the row a managed bean must be used
which calls DataModel.getRowData() from the rows datamodel and the
columns datamodel to determine the current row and column.

Mathias

> -----Original Message-----
> From: Jaroslav Rychna [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 31, 2005 9:58 PM
> To: MyFaces Discussion
> Subject: new components
> 
> 
> Please,
> what these component do?
> 
> CollapsiblePanel Component
> crosstable component (x:columns)
> 
> jarin
> 
> 

Reply via email to