# <netui-data:pad> Tag

This tag determines the number of items that are rendered by a <netui-data:repeater> tag.

## Syntax

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

## Description

This tag determines the number of items that are 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:

> - `maxRepeat` - truncates the rendering of the data set
> - `minRepeat` - forces the <netui-data:repeater> to render a minimum number of elements
> - `padText - default text to render if the data set does not have the minimum number of elements`

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

## Attributes

maxRepeat | 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.
Required | Supports runtime expression evaluation | Data bindable
No | No | Yes
minRepeat | 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.
Required | Supports runtime expression evaluation | Data bindable
No | No | Yes
padText | The text will be used when padding a <netui-data:repeater> that renders too few times
Required | Supports runtime expression evaluation | Data bindable
No | No | Yes

## Sample

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>

## Sample Code

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/pad/

## Related Topics

<netui-data:pad> Tag Sample

<netui-data:repeater> Tag