org.apache.beehive.netui.tags.databinding.repeater
Class RepeaterHeader
Object
TagSupport
BodyTagSupport
AbstractClassicTag
StructuredBaseTag
RepeaterComponent
RepeaterHeader
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
public class RepeaterHeader
- extends RepeaterComponent
This tag is used to render the header of a Repeater
. This header may contain
any markup or tags that can be rendered to a page. In the case of starting a
table, ordered list, or unordered list, the HTML elements <table>, <ol>,
and <ul> could respectively be rendered inside the body of this tag.
There is no data item present at the time that the RepeaterHeader renders, so tags in the
body can not reference the container
databinding context to access
a current item or index, though other databinding contexts are available.
The RepeaterHeader renders exactly once in a table during the Repeater
tag's Repeater.HEADER
rendering state.
- See Also:
- Serialized Form
- Example
- The following sample renders the data set as an HTML table. The table has two columns, "index" and "name",
and each iteration over the data set is rendered a row of the table. The <netui-data:repeaterHeader>
tag renders once, before the iteration has begun. It renders an opening HTML table tag and
two header rows for the table.
<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:label value="{container.index}" />
</td>
<td>
<netui:label 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 |
Method Summary |
int |
doAfterBody()
Render the content of the body to the Repeater tag. |
String |
getTagName()
Get the name of this tag. |
protected void |
localRelease()
Reset all of the fields of this tag. |
int |
renderStartTag(int state)
Render the start of this tag. |
Methods inherited from class AbstractClassicTag |
addTagIdMapping, applyNamingChain, getErrorsReport, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, renderAttribute, 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 |
RepeaterHeader
public RepeaterHeader()
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.
renderStartTag
public int renderStartTag(int state)
- Render the start of this tag. If the repeater render state is
Repeater.HEADER
,
the body is evaluated. Otherwise, the body is skipped.
- Specified by:
renderStartTag
in class StructuredBaseTag
- Returns:
- SKIP_BODY unless the repeater render state is
Repeater.HEADER
, then EVAL_BODY_BUFFERED
doAfterBody
public int doAfterBody()
- Render the content of the body to the Repeater tag.
- Specified by:
doAfterBody
in interface IterationTag
- Overrides:
doAfterBody
in class RepeaterComponent
- Returns:
- SKIP_BODY
localRelease
protected void localRelease()
- Description copied from class:
RepeaterComponent
- Reset all of the fields of this tag.
- Overrides:
localRelease
in class RepeaterComponent