You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2006/04/19 15:01:59 UTC
[Myfaces Wiki] Update of "Extended Data Table" by ErnstFastl
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.
The following page has been changed by ErnstFastl:
http://wiki.apache.org/myfaces/Extended_Data_Table
New page:
##language:en
== 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>
}}}
=== Display ===