|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag com.bea.wlw.netui.tags.databinding.repeater.RepeaterComponent com.bea.wlw.netui.tags.databinding.repeater.RepeaterItem
public class RepeaterItem
This tag is used to render each item in the data set. The items in the data set are
provided by this tag's Repeater parent and are available for databinding using the
container
databinding context. The current item is referenced
using the container.item
expression.
The RepeaterItem tag can only be uesd when directly contained by a Repeater tag, and
a RepeaterItem is rendered during the Repeater's Repeater.ITEM
rendering state.
By default, the RepeaterItem simply renders its body once for each of the items in the Repeater tag's data set.
A RepeaterItem has the ability to render different markup for each of the items that
it renders. This is possible using the ChoiceMethod
and Choice
tags.
These tags are used inside of the body to select which Choice
tag to render
and delineate each option that could be chosen.
Repeater
,
RepeaterHeader
,
RepeaterFooter
,
Choice
,
Serialized Form<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>
Repeater
tag.
As an individual item is being iterated over, it is available using the
{container.item}
databinding 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> simply renders its body once for each of the items in the <netui-data:repeater> tag's data set.
A <netui-data:repeaterItem> has the ability to render different HTML
markup for each of the items that
it renders. This is possible using the
ChoiceMethod
and Choice
tags.
The <netui-data:choiceMethod> tag decides which <netui-data:choice>
tag to render.
Field Summary | |
---|---|
static int |
CHOOSE
The RepeaterItem lifecycle state that runs through the body in order to find all of the possible Choice tags, their values, and the default Choice
if present. |
static int |
RENDER
The RepeaterItem lifecycle state that runs through the body in order to render the body of the RepeaterItem. |
Fields inherited from class com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag |
---|
EMPTY_STRING |
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag |
---|
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants |
---|
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
RepeaterItem()
|
Method Summary | |
---|---|
int |
doAfterBody()
Render the result of having evalutaed the body. |
Object |
getChoiceValue()
Get the value of a nested Choice tag whose value attribute
corresponds to the value selected by executing the ChoiceMethod tag. |
int |
getRenderState()
Get the current render state of the RepeaterItem. |
String |
getTagName()
Get the name of this tag. |
boolean |
hasRenderedItem()
Get a boolean that denotes that an item has been rendered for this RepeaterItem. |
protected void |
localRelease()
Reset all of the fields of this tag. |
void |
registerChildTag(AbstractBaseTag tag)
Register chlid tags that need to be handled specially by the RepeaterItem. |
int |
renderStartTag(int state)
Render the start of this tag. |
void |
setChoiceValue(Object choiceValue)
Set the value on a Choice tag whose value attribute
matched the result of the result of invoking the ChoiceMethod . |
void |
setRenderedItem(boolean renderedItem)
A boolean that denotes that an item has been rendered from the set of Choice
tags that may be present in the body of a RepeaterItem tag. |
boolean |
shouldRender(Object value,
boolean defaultItem)
The decision method that the Choice tags use to determine if the
calling Choice tag is the one that hsould render. |
void |
stopRendering()
|
Methods inherited from class com.bea.wlw.netui.tags.databinding.repeater.RepeaterComponent |
---|
getCurrentRenderState, getRepeater, getValidContainerType, prepare, renderEndTag |
Methods inherited from class com.bea.wlw.netui.tags.databinding.base.StructuredBaseTag |
---|
addContent, doEndTag, doStartTag, getContent, verifyAttributes, verifyStructure |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setParent |
Field Detail |
---|
public static final int CHOOSE
Choice
tags, their values, and the default Choice
if present.
public static final int RENDER
Constructor Detail |
---|
public RepeaterItem()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public Object getChoiceValue()
Choice
tag whose value
attribute
corresponds to the value selected by executing the ChoiceMethod
tag. This
value is used to determine which Choice
tag should render its body.
value
attribute from a nested Choice
tag that matched
the return value of the ChoiceMethod
.public void setChoiceValue(Object choiceValue)
Choice
tag whose value
attribute
matched the result of the result of invoking the ChoiceMethod
.
choiceValue
- the result of executing the ChoiceMethod
value
attribute
matched the result of invoking the <netui-data:choiceMethod> tag.public void setRenderedItem(boolean renderedItem)
Choice
tags that may be present in the body of a RepeaterItem tag.
renderedItem
- public boolean hasRenderedItem()
Choice
tags, this will always return false and the body
of the RepeaterItem will always render for each item.
true
if the Choice functionality is being used and a Choice
has
rendered; false
otherwise.public int getRenderState()
public void registerChildTag(AbstractBaseTag tag)
Choice
,
ChoiceMethod
, and other tags that need special treatment by
the RepeaterItem.
tag
- the tag to register.public boolean shouldRender(Object value, boolean defaultItem)
Choice
tags use to determine if the
calling Choice
tag is the one that hsould render. The rules for deciding
if a Choice
tag should render are as follows:
value
attribute on one of the nested Choice
that matched the result of the ChoiceMethod
's decision method and the calling
Choice
tag's Choice.setDefault(boolean)
is true
,
this method returns true
. value
param matches the getChoiceValue()
property, this
method returns true
.
value
- the Choice.setValue(String)
attribute on the Choice
tag that
is asking if it should render its body.defaultItem
- the Choice.setDefault(boolean)
attribute on the Choice
tag that is asking if it should render its body.
true
if the Choice
should render; false
otherwise.public int renderStartTag(int state)
Repeater.ITEM
,
the body is evaluated. Otherwise, the body is skipped.
renderStartTag
in class StructuredBaseTag
Repeater.ITEM
, then EVAL_BODY_BUFFEREDpublic int doAfterBody() throws javax.servlet.jsp.JspException
ChoiceMethod
and Choice
tags are present, the body is evaluated twice;
once to decide whilch Choice
to render and once to actually render the body of that
Choice
tag.
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
in class RepeaterComponent
javax.servlet.jsp.JspException
protected void localRelease()
localRelease
in class RepeaterComponent
public void stopRendering()
|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |