|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| 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
com.jivesoftware.base.tags.CacheTag
public class CacheTag
A simple tag that caches all content between the <cache> tags. The content can later be retrieved by id using an empty cache tag. The scope of the cache is just the request, so this cache is only good when you have exact duplicated blocks of JSP code or HTML on one page.
Usage:
<%-- Get the property --%>
<jive:cache id="key" >
... any JSP or HTML here ...
</jive:cache>
<jive:cache id="key" /> Attributes:
| Name | Required |
|---|---|
| id | Yes |
| Field Summary |
|---|
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id |
| 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 | |
|---|---|
CacheTag()
|
|
| Method Summary | |
|---|---|
int |
doAfterBody()
Always returns SKIP_BODY. |
int |
doEndTag()
Get the body content and store it in the cache (if it exists) and also write out the content. |
int |
doStartTag()
If the value of the id is found in the cache, write it out and return SKIP_BODY. |
javax.servlet.jsp.tagext.BodyContent |
getBodyContent()
Returns the body content of this tag. |
javax.servlet.jsp.tagext.Tag |
getParent()
Returns the parent tag of this Tag. |
void |
release()
|
void |
setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
Sets the body content between the start and end tags. |
void |
setPageContext(javax.servlet.jsp.PageContext pageContext)
Sets the page context of this Tag. |
void |
setParent(javax.servlet.jsp.tagext.Tag parentTag)
Sets the parent tag of this tag. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doInitBody, getPreviousOut |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getId, getValue, getValues, removeValue, setId, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheTag()
| Method Detail |
|---|
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
setPageContext in interface javax.servlet.jsp.tagext.TagsetPageContext in class javax.servlet.jsp.tagext.TagSupportpageContext - the page context for this Tag.public javax.servlet.jsp.tagext.Tag getParent()
getParent in interface javax.servlet.jsp.tagext.TaggetParent in class javax.servlet.jsp.tagext.TagSupportpublic void setParent(javax.servlet.jsp.tagext.Tag parentTag)
setParent in interface javax.servlet.jsp.tagext.TagsetParent in class javax.servlet.jsp.tagext.TagSupportparentTag - the parent tag of this tag.public javax.servlet.jsp.tagext.BodyContent getBodyContent()
getBodyContent in class javax.servlet.jsp.tagext.BodyTagSupportpublic void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
setBodyContent in interface javax.servlet.jsp.tagext.BodyTagsetBodyContent in class javax.servlet.jsp.tagext.BodyTagSupportbodyContent - the body content between the start and end tags.
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - if there is a problem writing the content out from cache.public int doAfterBody()
doAfterBody in interface javax.servlet.jsp.tagext.IterationTagdoAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - if there is a problem writing the body content.public void release()
release in interface javax.servlet.jsp.tagext.Tagrelease in class javax.servlet.jsp.tagext.BodyTagSupport
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||