OpenFaces Demo

OverviewFor Each

Demonstrated Features

  • Iterating over a collection of objects - A collection of objects can serve as a basis for iteration. Components embedded inside of For Each component can be configured based on the For Each loop variable which contains the current collection object.
  • Specifying iteration index range and step - By default For Each iterates over each entry in the associated collection, though its possible to restrict iteration to a certain index range and specify iteration step..
  • Wide range of supported collection types - Out of the box For Each component supports iteration over collections of following types:
    • javax.faces.model.DataModel
    • java.util.Collection (any descendant)
    • Array of any type
    • java.sql.ResultSet
    • javax.servlet.jsp.jstl.sql.Result