|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.tiles.jsp.taglib.RenderTagSupport
public abstract class RenderTagSupport
Support 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 java.lang.String |
preparer
The view preparer to use before the rendering. |
protected java.lang.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 | |
---|---|
RenderTagSupport()
|
Method Summary | |
---|---|
int |
doEndTag()
|
int |
doStartTag()
|
protected void |
endContext(javax.servlet.jsp.PageContext context)
Ends the context when exiting the tag. |
protected void |
execute()
Deprecated. Use render() . |
java.lang.String |
getPreparer()
Returns the preparer name. |
java.lang.String |
getRole()
Returns the role to check. |
protected boolean |
isAccessAllowed()
Deprecated. Implement access allowance in your own tag. |
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. |
void |
release()
|
protected abstract void |
render()
Render the specified content. |
void |
setFlush(boolean flush)
Sets the flush flag. |
void |
setIgnore(boolean ignore)
Sets the ignore flag. |
void |
setPreparer(java.lang.String preparer)
Sets the preparer name. |
void |
setRole(java.lang.String role)
Sets the role to check. |
protected void |
startContext(javax.servlet.jsp.PageContext context)
Starts the context when entering the tag. |
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 java.lang.String role
protected java.lang.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 RenderTagSupport()
Method Detail |
---|
public java.lang.String getRole()
public void setRole(java.lang.String role)
role
- The role to check.public java.lang.String getPreparer()
public void setPreparer(java.lang.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.public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.BodyTagSupport
public int doStartTag() throws TilesJspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
TilesJspException
public int doEndTag() throws TilesJspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
TilesJspException
protected void execute() throws TilesJspException, java.io.IOException
render()
.
TilesJspException
- if a jsp exception occurs.
java.io.IOException
- if an io exception occurs.protected abstract void render() throws TilesJspException, java.io.IOException
TilesJspException
- if a jsp exception occurs.
java.io.IOException
- if an io exception occurs.protected void startContext(javax.servlet.jsp.PageContext context)
context
- The page context to use.protected void endContext(javax.servlet.jsp.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.protected boolean isAccessAllowed()
true
if the user is allowed to have the tag
rendered.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |