<netui-data:pad> Tag

Sets the number of items rendered by a <netui-data:repeater> tag.

Syntax

<netui-data:pad
    [maxRepeat="maxRepeat"]
    [minRepeat="minRepeat"]
    [padText="padText"] />

Description

Sets the number of items rendered by a <netui-data:repeater> tag. The <netui-data:pad> tag has the ability to turn an irregular data set in the <netui-data:repeater> tag into a regular data set through the use of the three attributes:

If the padText attribute is unset, the body of the <netui-data:pad> tag is used as the default text.

Attributes
maxRepeat
Required: No  |   Supports runtime evaluation: Yes  |   Data bindable: Yes

Set the maximum number of items that will be rendered by a <netui-data:repeater> tag. If the size of the data set is greater than this, only this many items will be rendered. This value can be an integer or can be an expression that resolves to an integer.
minRepeat
Required: No  |   Supports runtime evaluation: Yes  |   Data bindable: Yes

Set the minimum number of items that will be rendered by a <netui-data:repeater> tag. If the size of the data set is smaller than this, the data set will be padded with the value of the padText attribute. This value can be an integer or can be an expression that resolves to an integer.
padText
Required: No  |   Supports runtime evaluation: Yes  |   Data bindable: Yes

The text will be used when padding a <netui-data:repeater> that renders too few times

 
Example

In the following example, assume that the <netui-data:repeater> tag iterates over a java.util.List object. The <netui-data:pad> limits the iteration to three cycles, no matter how many elements are actually in the List.

    <netui-data:repeater dataSource="{pageFlow.myList}">
         <netui-data:pad maxRepeat="3"/>
             <netui-data:repeaterItem>
                 <netui:label value="{container.item}" />
             </netui-data:repeaterItem>
     </netui-data:repeater>