|
||||||||||
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 org.apache.tiles.jsp.taglib.TilesBodyTag org.apache.tiles.jsp.taglib.RenderTag
public abstract class RenderTag
Abstracts class for all tags which render (an attribute, a template, or definition).
Properly invokes the defined preparer and invokes the abstract render method upon completion.
This tag takes special care to ensure that the attribute context is reset to it's original state after the execution of the tag is complete. This ensures that all all included attributes in subsequent tiles are scoped properly and do not bleed outside their intended scope.
Field Summary | |
---|---|
protected AttributeContext |
attributeContext
The attribute context to use to store and read attribute values. |
protected TilesContainer |
container
The Tiles container that can be used inside the tag. |
protected boolean |
flush
This flag, if true , flushes the content before rendering. |
protected boolean |
ignore
This flag, if true , ignores exception thrown by preparers
and those caused by problems with definitions. |
protected String |
preparer
The view preparer to use before the rendering. |
protected String |
role
The role to check. |
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 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 | |
---|---|
RenderTag()
|
Method Summary | |
---|---|
int |
doEndTag()
|
int |
doStartTag()
|
protected void |
endContext(PageContext context)
Ends the context when exiting the tag. |
String |
getPreparer()
Returns the preparer name. |
String |
getRole()
Returns the role to check. |
boolean |
isFlush()
Returns the flush flag. |
boolean |
isIgnore()
Returns the ignore flag. |
void |
processNestedTag(PutAttributeTag nestedTag)
Process nested ≶put> tag. |
void |
processNestedTag(PutListAttributeTag nestedTag)
Process the nested tag. |
protected abstract void |
render()
Render the specified content. |
protected void |
reset()
Release any per-invocation resources, resetting any resources or state that should be cleared between successive invocations of Tag.doEndTag() and
Tag.doStartTag() . |
void |
setFlush(boolean flush)
Sets the flush flag. |
void |
setIgnore(boolean ignore)
Sets the ignore flag. |
void |
setPreparer(String preparer)
Sets the preparer name. |
void |
setRole(String role)
Sets the role to check. |
protected void |
startContext(PageContext context)
Starts the context when entering the tag. |
Methods inherited from class org.apache.tiles.jsp.taglib.TilesBodyTag |
---|
doCatch, doFinally, release |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, 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, setPageContext, setParent |
Field Detail |
---|
protected String role
protected String preparer
protected boolean flush
true
, flushes the content before rendering.
protected boolean ignore
true
, ignores exception thrown by preparers
and those caused by problems with definitions.
protected TilesContainer container
protected AttributeContext attributeContext
Constructor Detail |
---|
public RenderTag()
Method Detail |
---|
public String getRole()
public void setRole(String role)
role
- The role to check.public String getPreparer()
public void setPreparer(String preparer)
preparer
- The preparer name.public boolean isFlush()
true
, current page out stream
is flushed before insertion.
public void setFlush(boolean flush)
true
, current page out stream
is flushed before insertion.
flush
- The flush flag.public boolean isIgnore()
public void setIgnore(boolean ignore)
ignore
- The ignore flag.protected void reset()
Tag.doEndTag()
and
Tag.doStartTag()
.
reset
in class TilesBodyTag
public int doStartTag() throws TilesJspException
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
TilesJspException
public int doEndTag() throws TilesJspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
TilesJspException
protected abstract void render() throws TilesJspException, IOException
TilesJspException
- if a jsp exception occurs.
IOException
- if an io exception occurs.protected void startContext(PageContext context)
context
- The page context to use.protected void endContext(PageContext context)
context
- The page context to use.public void processNestedTag(PutAttributeTag nestedTag)
Process nested ≶put> tag.
Places the value of the nested tag within the
AttributeContext
.It is the responsibility
of the descendent to check security. Security will be managed by
called tags.
processNestedTag
in interface PutAttributeTagParent
nestedTag
- the put tag desciendent.public void processNestedTag(PutListAttributeTag nestedTag)
processNestedTag
in interface PutListAttributeTagParent
nestedTag
- Nested tag to process.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |