|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTagSupport
BodyTagSupport
AbstractClassicTag
StructuredBaseTag
RepeaterComponent
Pad
public class Pad
A tag that affects the number of items that are rendered in a
Repeater
.
The Pad tag has the ability to turn an irregular data set in the
Repeater
into a regular dataset through the use of the three attributes on the Pad tag. The Pad tag can
truncate the rendering of a data set if enough items have been rendered or can
pad a default item text onto the end of a data set that is not big enough. If the padText attribute
is unset, the body of the Pad tag is used as the padText.
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.
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>
Field Summary |
---|
Fields inherited from class AbstractClassicTag |
---|
DefaultNamingChain, NETUI_UNIQUE_CNT |
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 |
Constructor Summary | |
---|---|
Pad()
|
Method Summary | |
---|---|
String |
getTagName()
Get the name of this tag. |
protected void |
localRelease()
Reset all of the fields of this tag. |
int |
renderEndTag(int state)
Complete rendering the body of this tag. |
int |
renderStartTag(int state)
Render the body of this tag and buffer the output. |
void |
setMaxRepeat(int maxRepeat)
Set the maximum number of items that will be rendered by a Repeater. |
void |
setMinRepeat(int minRepeat)
Set the minimum number of items that will be rendered by a Repeater. |
void |
setPadText(String padText)
Set the text that will be used when padding a Repeater that renders its body too few times. |
protected void |
verifyAttributes()
Verify that the attributes set on the tag are correct. |
Methods inherited from class RepeaterComponent |
---|
doAfterBody, getCurrentRenderState, getRepeater, getValidContainerType, prepare |
Methods inherited from class StructuredBaseTag |
---|
addContent, doEndTag, doStartTag, getContent |
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 |
Constructor Detail |
---|
public Pad()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class AbstractClassicTag
public void setPadText(String padText)
padText
- the text that is used to pad a repeater's contentpublic void setMaxRepeat(int maxRepeat)
maxRepeat
- an integer or an expression that references an integer
for the maximum number of items to renderpublic void setMinRepeat(int minRepeat)
minRepeat
- an integer or an expression that references
an integer for the minimum number of items to renderpublic int renderStartTag(int state) throws JspException
renderStartTag
in class StructuredBaseTag
JspException
public int renderEndTag(int state) throws JspException
renderEndTag
in class RepeaterComponent
state
- the current render state of the Repeater
JspException
- if an error occurs that can not be reported on the pageprotected void localRelease()
localRelease
in class RepeaterComponent
protected void verifyAttributes() throws JspException
verifyAttributes
in class StructuredBaseTag
JspException
- if an error occurs that can not be reported on the page
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |