6.6.11. < rich:subTable > available since 3.0.0

### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.6.11. < rich:subTable > available since 3.0.0

expand all

#### 6.6.11.1. Description

The component is used for inserting subtables into tables with opportunity to choose data from a model and built-in Ajax updates support.

Figure 6.39. <rich:subTable> element

#### 6.6.11.2. Key Features

- Completely skinned table rows and child elements

- Possibility to insert complex columnGroup subcomponents

- Possibility to combine rows and columns inside

- Possibility to update a limited set of rows with Ajax

#### 6.6.11.3. Details of Usage

The <rich:subTable> component is similar to the <h:dataTable> one, except Ajax support and skinnability. One more difference is that the component doesn't add the wrapping <table> and <tbody> tags. Ajax support is possible, because the component was created basing on the <a4j:repeat> component and as a result it could be partially updated with Ajax. The "ajaxKeys" attribute allows to define row keys which are updated after an Ajax request. You can find an example which demonstrate the usage of the "ajaxKeys" attributes for data iteration components in the RichFaces Cookbook article.

The component allows to use "header" and "footer" facets for output. See an example for <rich:dataTable> component.

#### 6.6.11.4. Reference Data

Table of <rich:subTable> attributes.

Table 6.55. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.SubTable
component-class | org.richfaces.component.html.HtmlSubTable
component-family | org.richfaces.SubTable
renderer-type | org.richfaces.SubTableRenderer
tag-class | org.richfaces.taglib.SubTableTag

Table 6.56. Facets

Facet name | Description
--- | ---
header | Defines the header content
footer | Defines the footer content

Table 6.57. Style classes (selectors) with the corresponding skin parameters

Class (selector) name | Description | Skin Parameters | CSS properties mapped
--- | --- | --- | ---
.rich-subtable-cell | Defines styles for a subtable cell | generalSizeFont | font-size
generalTextColor | color
generalFamilyFont | font-family
.rich-subtable-headercell | Defines styles for a subtable header cell | tableBorderWidth, tableBorderColor | border-right, border-bottom
generalTextColor | color
generalSizeFont | font-size
generalFamilyFont | font-family
.rich-subtable-header | Defines styles for a subtable header row | additionalBackgroundColor | background-color
.rich-subtable-footer | Defines styles for a subtable footer row | tableSubfooterBackgroundColor | background-color
.rich-subtable-footercell | Defines styles for a subtable footer cell | tableBorderWidth, tableBorderColor | border-right, border-bottom

Table 6.58. Style classes (selectors) without skin parameters

Class name | Description
--- | ---
.rich-subtable | Defines styles for all subtable
.rich-subtable-caption | Defines styles for a "caption" facet element
.rich-subtable-header-continue | Defines styles for all subtable header lines after the first
.rich-subtable-subheader | Defines styles for a column header of subtable
.rich-subtable-subfooter | Defines styles for a column footer of subtable
.rich-subtable-footer-continue | Defines styles for all subtable footer lines after the first
.rich-subtable-subheadercell | Defines styles for a column header cell of subtable
.rich-subtable-row | Defines styles for a subtable row
.rich-subtable-firstrow | Defines styles for a subtable start row
.rich-subtable-subfootercell | Defines styles for a column footer cell of subtable

You can find all necessary information about style classes redefinition in Definition of Custom Style Classes section.

- Prev6.6.10. < rich:dataTable > ...
- Top of page
- Front page
- Next6.6.12. < rich:extendedDataTable > ...