### 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.7. < rich:dataList > available since 3.0.0

expand all

#### 6.6.7.1. Description

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

Figure 6.29. <rich:dataList> component

#### 6.6.7.2. Key Features

- A completely skinned list and child elements

- Possibility to update a limited set of rows with Ajax

- Possibility to receive values dynamically from a model

#### 6.6.7.3. Details of Usage

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

The component has the "type" attribute, which corresponds to the "type" parameter for the <ul> HTML element and defines a marker type. Possible values for "type" attribute are: "disc", "circle", "square".

Here is an example:

    ...

    <h:form>

            <rich:dataList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="disc" title="Car Store">

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

                    <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:dataList>

    </h:form>

    ...

This is a result:

Figure 6.30. <rich:dataList> component with "type" attribute

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. See the picture below:

Figure 6.31. The <rich:dataList> component with "title" attribute

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

#### 6.6.7.4. Reference Data

Table of <rich:dataList> attributes.

Table 6.42. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.DataList
component-class | org.richfaces.component.html.HtmlDataList
component-family | org.richfaces.DataList
renderer-type | org.richfaces.DataListRenderer
tag-class | org.richfaces.taglib.DataListTag

Table 6.43. Style classes (selectors) without skin parameters

Class name | Description
--- | ---
.rich-datalist | Defines styles for an html <ul> element
.rich-list-item | Defines styles for an html <li> element

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

#### 6.6.7.5. Relevant Resources Links

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

- Prev6.6.6. < rich:dataGrid > ...
- Top of page
- Front page
- Next6.6.8. < rich:dataOrderedList > ...