Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
12c (12.2.1.2)

E76720-01

<af:iterator>

iterator iterator


Naming container: Yes. When referring to children of this component ("partialTriggers", findComponent(), etc.), you must prefix the child's ID with this component's ID and a colon (':').
UIXIterator is a component that does iteration. It is similar to UIXTable but has no chrome. Each child is repeatedly stamped as many times as necessary. Iteration is done starting at the index given by the "first" attribute, for as many indices as specified by the "rows" attribute. If "rows" returns 0, then the iteration continues until there are no more elements in the underlying data.
While the <af:forEach> will be sufficient for most user's needs, it does not work with a JSF DataModel, or CollectionModel. It also cannot be bound to EL expressions that use component-managed EL variables (such as the "var" variable on an <af:table>). The <af:iterator> tag was created to address these issues.

By default, it processes up to 25 rows. Use the rows attribute to alter this behavior.

Attributes

Name Type Supports EL? Description
attributeChangeListener javax.faces.el.MethodBinding Only EL a method reference to an attribute change listener
binding oracle.adf.view.rich.component.UIXIterator Only EL a binding reference to store the component instance
first int Only EL the index of the first row in the currently range of rows. This index is zero-based. This attribute is used to control which range of rows to display to the user.
id String No the identifier for the component. This must be a valid XML ID, and therefore may not contain whitespace or start with a number. Also, JSF requires that IDs must not contain any colons (":").
rendered boolean Yes whether the bean is rendered. When set to false, no output will be delivered for this bean.
rows int Yes the maximum number of rows to display in a single range of rows. Some ranges might have fewer than the number of rows specified by this attribute (eg: the last range might have an insufficient number of rows). To display all rows at once, set this attribute to 0. The default is 25.
value Object Yes The specific model class is oracle.adf.view.rich.model.CollectionModel. You may also use other model instances, e.g., java.util.List , array, and javax.faces.model.DataModel. This component will automatically convert the instance into a CollectionModel;.
var String No Name of the EL variable used to reference each element of this collection. Once this component has completed rendering, this variable is removed (or reverted back to its previous value).
varStatus String No Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. For components that iterate, varStatus also provides loop counter information. Please see the this component's documentation for the specific properties on the varStatus. The common properties on varStatus include:
  • "model" - returns the CollectionModel for this component
  • "index" - returns the zero based row index