JBoss.orgCommunity Documentation
The component to render ordered lists that allows choosing data from a model and obtains built-in support of Ajax updates.
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
The <rich:dataOrderedList> component allows to generate an ordered list from a model.
The component has the "type" attribute, which corresponds to the "type" parameter for the <ol> HTML element and defines a marker type. Possible values for "type" attribute are: "A", "a", "I", "i", "1".
Here is an example:
...
<h:form>
<rich:dataOrderedList var="car" value="#{dataTableScrollerBean.allCars}" rows="5" type="1" 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:dataOrderedList>
</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:dataOrderedList> 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:dataOrderedList> attributes.
Table 6.44. Component Identification Parameters
Name | Value |
---|---|
component-type | org.richfaces.DataOrderedList |
component-class | org.richfaces.component.html.HtmlDataOrderedList |
component-family | org.richfaces.DataOrderedList |
renderer-type | org.richfaces.DataOrderedListRenderer |
tag-class | org.richfaces.taglib.DataOrderedListTag |
Table 6.45. Style classes (selectors) without skin parameters
Class name | Description |
---|---|
.rich-orderedlist | Defines styles for an html <ol> 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.
On the component LiveDemo page you can see the example of <rich:dataOrderedList > usage and sources for the given example.