6.6.4. < rich:dataDefinitionList > 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.4. < rich:dataDefinitionList > available since 3.0.0

expand all

#### 6.6.4.1. Description

The component to render definition lists that allows choosing data from a model and obtains built-in support of Ajax updates.

Figure 6.24. <rich:dataDefinitionList> component

#### 6.6.4.2. Key Features

- Completely skinned table rows and child elements

- Possibility to update a limited set of rows with Ajax

- Possibility to receive values dynamically from a model

#### 6.6.4.3. Details of Usage

The <rich:dataDefinitionList> component allows to generate a definition list from a model.

The component has the "term" facet, which corresponds to the "type" parameter for the <dt> HTML element.

Here is an example:

    ...

    <h:form>

            <rich:dataDefinitionList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" first="4" title="Cars">

                    <f:facet name="term">

                        <h:outputText value="#{car.make} #{car.model}"></h:outputText>

                    </f:facet>

                    <h:outputText value="Price:" styleClass="label"></h:outputText>

                    <h:outputText value="#{car.price}" /><br/>

                    <h:outputText value="Mileage:" styleClass="label"></h:outputText>

                    <h:outputText value="#{car.mileage}" /><br/>

            </rich:dataDefinitionList>

    </h:form>

    ...

This is a result:

Figure 6.25. <rich:dataDefinitionList> component with "term" facet

In the example the "rows" attribute limits a number of output elements of the list.

The "first" attribute defines the first element for output. "title" is used for a popup title.

The <rich:dataDefinitionList> component could be partially updated with Ajax. The "ajaxKeys" attribute points to an Object (java.util.Set) that should contain row keys to be updated after an Ajax request. See an example of usage the "ajaxKeys" attribute for the <rich:dataList> component in the RichFacs Cookbook article.

#### 6.6.4.4. Reference Data

Table of <rich:dataDefinitionList> attributes.

Table 6.35. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.DataDefinitionList
component-class | org.richfaces.component.html.HtmlDataDefinitionList
component-family | org.richfaces.DataDefinitionList
renderer-type | org.richfaces.DataDefinitionListRenderer
tag-class | org.richfaces.taglib.DataDefinitionListTag

Table 6.36. Style classes (selectors) without skin parameters

Class name | Description
--- | ---
.rich-deflist | Defines styles for an html <dl> element
.rich-definition | Defines styles for an html <dd> element
.rich-definition-term | Defines styles for an html <dt> element

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

#### 6.6.4.5. Relevant Resources Links

On the component LiveDemo page you can see the example of <rich:dataDefinitionList> usage and sources for the given example.

- Prev6.6.3. < rich:columns > ...
- Top of page
- Front page
- Next6.6.5. < rich:dataFilterSlider > ...