Differences between revisions 3 and 4
Revision 3 as of 2006-08-25 15:32:38
Size: 2678
Comment: Minor rewording to educate end-users on facets.
Revision 4 as of 2009-09-20 23:00:55
Size: 2678
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Extended Data Table

The extended Data Table provides more attributes than the conventional Data Table. Among other Attributes the extended Data Table provides Attributes to sort by columns and to group by columns.

Grouping Functionality

It is possible to Group the content of an extended Datatable by certain Columns. Therefore the groupBy-Attribute of each t:column that is supposed to be in the group has to be set to "true". The dataTable itself provides the Attributes rowGroupStyle and rowGroupStyleClass. Those corresponde to CSS-Style-Attribute and CSS-Class Attribute of each Table-Cell that either is a grouped column itself or that is at the end of a group.

Example

<t:dataTable id="data"
                style="border-collapse:collapse;"
                styleClass="standardTable"
                headerClass="standardTable_Header"
                footerClass="standardTable_Header"
                rowClasses="standardTable_Row1,standardTable_Row2"
                var="demo"
                value="#{simpleGroupBy.demoList}"
                preserveDataModel="true"
                rowGroupStyle="border-bottom:blue;border-bottom-style:solid;border-bottom-width:2px;vertical-align:top"
                rowGroupStyleClass="testclass">
           <t:column groupBy="true">
               <f:facet name="header">
                  <h:outputText value="Groups" />
               </f:facet>
                    <h:outputText value="#{demo.value1}" />
           </t:column>

           <t:column>
               <f:facet name="header">
                  <h:outputText value="Items" />
               </f:facet>
               <h:outputText value="#{demo.value2}" />
           </t:column>


        </t:dataTable>

Headers and Footers

Both the Table and the individual columns support Header and Footers. This is done via <f:facet name="header|footer">. Facets never allow more than one child element. If you need more than one child component, enclose them in a panel group <h:panelGroup>.

Extended_Data_Table (last edited 2009-09-20 23:00:55 by localhost)