repeat

Table of Contents

Overview

Since 4.2

You can use icecore:repeat tag to iterate its child components over the items of a data source (such as java.util.Collection, array or java.sql.ResultSet). It can also provides iteration information by means of a additional variable.

See the ICEfaces Showcase Live Demo of this component, complete with source code.

Getting Started

To use the icecore:repeat tag, first declare the core namespace:

<html ... xmlns:icecore="http://www.icefaces.org/icefaces/core">

Then add the tag to your page markup and define the interval (in seconds) after which the markup should be made visible:

<h:body>
...
<table>
    ...
    <tbody>
    <icecore:repeat value="#{test.items}" var="item" varStatus="status">
        <tr>
            <td><h:outputText value="#{item}"/></td>
            <td><h:outputText value="#{status.index}"/></td>
            <td><h:outputText value="#{status.first}"/></td>
            <td><h:outputText value="#{status.last}"/></td>
        </tr>
    </icecore:repeat>
    </tbody>
</table>
...
</h:body>

Attributes

TagLib Documentation
This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available here.

var Use this attribute to specify the the request-scope attribute under which the current item will be exposed when iterating.

varStatus Use this attribute to specify a the request-scope attribute under which the iteration status for the current item will be exposed. When not specified the request-scope attribute is not set.

first Use this attribute to specify a zero-relative index of the first item to be displayed. When not specified the default value is "0".

rows Use this attribute to specify a the number of rows to be displayed. When not specified the default value is the maximum number of available items.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2018 ICEsoft Technologies Canada Corp.