10. Facelets UI Tag Reference
Contents > Facelets UI Tag Reference > ui:repeat
ui:repeat |
|
The UI Repeat tag is used to iterate over a collection of objects exposed to the JSF page as a value-binding EL expression. It is intended as a replacement for the c:forEach tag from the JSTL Core tag library. You can also use this tag with the "jsfc" feature in Facelets.
Example
<ul>
<ui:repeat value="#{myBean.products}" var="product">
<li><h:outputText value="#{product.name}" /></li>
</ui:repeat>
</ul>
HTML Output
<ul>
<li>Tennis Racquet</li>
<li>Baseball Bat</li>
<li>Hockey Stick</li>
</ul>
|
Tag Attributes
| value |
Text |
| Required |
| The value attribute specifies the value-binding EL expression that resolves to a List of objects to be iterated over. |
| var |
Text |
| Required |
| The var attribute sets the name of a request-scope attribute exposing the data for each iteration over the rows in the underlying data model for this table. |
|