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.13.  < a4j:repeat > available since 3.0.0

expand all Description Details of Usage Reference Data Relevant Resources Links

The <a4j:repeat> component implements a basic iteration component that allows to update a set of its children with Ajax.

The <a4j:repeat> component is similar to Facelets <ui:repeat> tag, which is used to iterate through a collection of objects binded with JSF page as EL expression. The main difference of the <a4j:repeat> is a possibility to update particular components (it's children) instead of all using Ajax requests. The feature that makes the component different is a special "ajaxKeys" attribute that defines row that are updated after an Ajax request. As a result it becomes easier to update several child components separately without updating the whole page.

            <a4j:repeat value="#{repeatBean.items}" var="item" ajaxKeys="#{updateBean.updatedRow}">
                        <td><h:outputText value="#{item.code}" id="item1" /></td>
                        <td><h:outputText value="#{item.price}" id="item2" /></td>

The example above points to a method that contains row keys to be updated.

One more benefit of this component is absence of strictly defined markup as JSF HTML DataTable and TOMAHAWK DataTable have. Hence the components could be used more flexibly anywhere where it's necessary to output the results of selection from some collection.

If you want to output a collection as a plain HTML list, use the following structure:

      <a4j:repeat ...>

All other general attributes of the component are defined according to the similar attributes of iterative components ( <h:dataTable> or <ui:repeat> ) and are used in the same way.

Table of <a4j:repeat> attributes.

Visit the Repeat page at RichFaces LiveDemo for examples of component usage and their sources.

Here you can find information why you can't use <a4j:repeat> to iterate the menuItems, tabs and way to solve this problem.