org.apache.tiles.taglib
Class RenderTagSupport
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.tiles.taglib.ContainerTagSupport
org.apache.tiles.taglib.RenderTagSupport
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally, PutAttributeTagParent
- Direct Known Subclasses:
- InsertAttributeTag, InsertDefinitionTag, InsertTemplateTag
public abstract class RenderTagSupport
- extends ContainerTagSupport
- implements javax.servlet.jsp.tagext.TryCatchFinally, PutAttributeTagParent
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 component 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.
- Since:
- Tiles 2.0
- See Also:
- Serialized Form
Field Summary |
protected boolean |
flush
|
protected boolean |
ignore
|
protected java.lang.String |
preparer
|
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 |
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 |
preparer
protected java.lang.String preparer
flush
protected boolean flush
ignore
protected boolean ignore
RenderTagSupport
public RenderTagSupport()
getPreparer
public java.lang.String getPreparer()
setPreparer
public void setPreparer(java.lang.String preparer)
isFlush
public boolean isFlush()
setFlush
public void setFlush(boolean flush)
isIgnore
public boolean isIgnore()
setIgnore
public void setIgnore(boolean ignore)
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class ContainerTagSupport
doStartTag
public int doStartTag()
- Description copied from class:
ContainerTagSupport
- By default, all ContainerTags evaluate their body. Subclasses may choose to be more selective.
In any case, children can rely upon the container and componentContext being initialized if they
call
super.doStartTag()
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class ContainerTagSupport
doCatch
public void doCatch(java.lang.Throwable throwable)
throws java.lang.Throwable
- Specified by:
doCatch
in interface javax.servlet.jsp.tagext.TryCatchFinally
- Throws:
java.lang.Throwable
doFinally
public void doFinally()
- Specified by:
doFinally
in interface javax.servlet.jsp.tagext.TryCatchFinally
execute
protected void execute()
throws org.apache.tiles.TilesException,
javax.servlet.jsp.JspException,
java.io.IOException
- Execute the tag by invoking the preparer, if defined, and then
rendering.
- Specified by:
execute
in class ContainerTagSupport
- Throws:
org.apache.tiles.TilesException
- if a prepare or render exception occurs.
javax.servlet.jsp.JspException
- if a jsp exception occurs.
java.io.IOException
- if an io exception occurs.
render
protected abstract void render()
throws javax.servlet.jsp.JspException,
org.apache.tiles.TilesException,
java.io.IOException
- Render the specified content.
- Throws:
org.apache.tiles.TilesException
- if a prepare or render exception occurs.
javax.servlet.jsp.JspException
- if a jsp exception occurs.
java.io.IOException
- if an io exception occurs.
processNestedTag
public void processNestedTag(PutAttributeTag nestedTag)
- Process nested ≶put> tag.
Places the value of the nested tag within the
ComponentContext
.It is the responsibility
of the descendent to check security. Tags extending
the ContainerTagSupport
will automatically provide
the appropriate security.
- Specified by:
processNestedTag
in interface PutAttributeTagParent
- Parameters:
nestedTag
- the put tag desciendent.