Sets the number of items rendered by a <netui-data:repeater> tag.
<netui-data:pad
[maxRepeat="integer_or_expression_maxRepeat"]
[minRepeat="integer_or_expression_minRepeat"]
[padText="string_padText"] >
... JSP content ...
</netui-data:pad>
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:
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.
Note, the container
data binding context should not be used inside of the Pad's padText
attribute as binding to both the item
and index
could product unexpected results.
Attributes |
maxRepeat |
Required: No | Type:
String |
Supports runtime evaluation / JSP Expression Language: 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 | Type:
String |
Supports runtime evaluation / JSP Expression Language: 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 | Type:
String |
Supports runtime evaluation / JSP Expression Language: Yes |
Set the text that will be used when padding a <netui-data:repeater>
that renders its body too few times. |
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:span value="${container.item}" />
</netui-data:repeaterItem>
</netui-data:repeater>
Tag Information |
Tag Class | org.apache.beehive.netui.tags.databinding.repeater.pad.Pad |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |