|
||||||||||
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.RoleSecurityTagSupport org.apache.tiles.jsp.taglib.ContainerTagSupport org.apache.tiles.jsp.taglib.RenderTagSupport
public abstract class RenderTagSupport
Support for all tags which render (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 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. |
Fields inherited from class org.apache.tiles.jsp.taglib.ContainerTagSupport |
---|
attributeContext, container |
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 | |
---|---|
RenderTagSupport()
|
Method Summary | |
---|---|
int |
doStartTag()
By default, all ContainerTags evaluate their body. |
protected void |
execute()
Execute the tag by invoking the preparer, if defined, and then rendering. |
String |
getPreparer()
Returns the preparer name. |
boolean |
isFlush()
Returns the flush flag. |
boolean |
isIgnore()
Returns the ignore flag. |
void |
processNestedTag(PutAttributeTag nestedTag)
Process nested ≶put> 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. |
Methods inherited from class org.apache.tiles.jsp.taglib.ContainerTagSupport |
---|
doEndTag, endContext, release, startContext |
Methods inherited from class org.apache.tiles.jsp.taglib.RoleSecurityTagSupport |
---|
getRole, isAccessAllowed, setRole |
Methods inherited from class org.apache.tiles.jsp.taglib.TilesBodyTag |
---|
doCatch, doFinally |
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 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.
Constructor Detail |
---|
public RenderTagSupport()
Method Detail |
---|
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 RoleSecurityTagSupport
public int doStartTag() throws JspException
super.doStartTag()
doStartTag
in interface Tag
doStartTag
in class ContainerTagSupport
EVAL_BODY_BUFFERED
.
JspException
- If the container has not been initialized.protected void execute() throws TilesException, JspException, IOException
execute
in class RoleSecurityTagSupport
TilesException
- if a prepare or render exception occurs.
JspException
- if a jsp exception occurs.
IOException
- if an io exception occurs.protected abstract void render() throws JspException, TilesException, IOException
TilesException
- if a prepare or render exception occurs.
JspException
- if a jsp exception occurs.
IOException
- if an io exception occurs.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. Tags extending
the ContainerTagSupport
will automatically provide
the appropriate security.
processNestedTag
in interface PutAttributeTagParent
nestedTag
- the put tag desciendent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |