Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.6.4.  < rich:dataDefinitionList > available since 3.0.0

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


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:


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.

Table of <rich:dataDefinitionList> attributes.



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

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