org.apache.beehive.netui.tags.databinding.repeater
Class RepeaterItem
Object
TagSupport
BodyTagSupport
AbstractClassicTag
RepeaterComponent
RepeaterItem
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
public class RepeaterItem
- extends RepeaterComponent
This tag is used to render an individual item in the data set as it is iterated over by
the Repeater
tag. As an individual item is being iterated over, it is available using the
${container.item}
JSP EL expression. The <netui-data:repeaterItem> tag can only be
uesd when directly contained by a <netui-data:repeater> tag.
By default, the <netui-data:repeaterItem> renders its body exactly once for each of the items in the
<netui-data:repeater> tag's data set.
For example, the following sample renders the data set as an HTML table. The <netui-data:repeaterItem> tag
renders a new row in the table for each item in the data set.
<netui-data:repeater dataSource="pageFlow.myDataSet">
<netui-data:repeaterHeader>
<table border="1">
<tr>
<td><b>index</b></td>
<td><b>name</b></td>
</tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<tr>
<td>
<netui:span value="${container.index}" />
</td>
<td>
<netui:span value="${container.item}" />
</td>
</tr>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</table>
</netui-data:repeaterFooter>
</netui-data:repeater>
- See Also:
- Serialized Form
- Example
- For example, the following sample renders the data set as an HTML table. The <netui-data:repeaterItem> tag
renders a new row in the table for each item in the data set.
<netui-data:repeater dataSource="pageFlow.myDataSet">
<netui-data:repeaterHeader>
<table border="1">
<tr>
<td><b>index</b></td>
<td><b>name</b></td>
</tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<tr>
<td>
<netui:span value="${container.index}" />
</td>
<td>
<netui:span value="${container.item}" />
</td>
</tr>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</table>
</netui-data:repeaterFooter>
</netui-data:repeater>
Fields inherited from class BodyTagSupport |
bodyContent |
Fields inherited from class TagSupport |
id, pageContext |
Fields inherited from interface BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Methods inherited from class AbstractClassicTag |
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNearestForm, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
getParent, setPageContext, setParent |
RepeaterItem
public RepeaterItem()
getTagName
public String getTagName()
- Get the name of this tag. This is used to identify the type of this tag for reporting tag errors.
- Specified by:
getTagName
in interface INetuiTag
- Specified by:
getTagName
in class AbstractClassicTag
- Returns:
- a constant String representing the name of this tag.
shouldRender
protected boolean shouldRender()
- Specified by:
shouldRender
in class RepeaterComponent