|
||||||||||
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 | +--javawebparts.taglib.basicstr.ReplaceTag
This class is a custom tag that replaces substrings within a string.
This tag uses the following attributes:
match - This is the string to find within the text
replaceWidth - As the name implies, any occurances of the string defined
by the match parameter will be replaced in the text
Field Summary | |
private static org.apache.commons.logging.Log |
log
Log instance. |
private java.lang.String |
match
This is the attribute that defines the substring to search for. |
private java.lang.String |
replaceWith
This is the attribute that defines what to replace substring with. |
private java.lang.String |
text
This is the body content text to be altered. |
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 | |
ReplaceTag()
|
Method Summary | |
int |
doAfterBody()
Alter the body content. |
int |
doEndTag()
Render the altered body. |
void |
setMatch(java.lang.String inMatch)
match mutator. |
void |
setReplaceWith(java.lang.String inReplaceWith)
replaceWith mutator. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, doStartTag, getBodyContent, getPreviousOut, release, 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 |
private static org.apache.commons.logging.Log log
private java.lang.String text
private java.lang.String match
private java.lang.String replaceWith
Constructor Detail |
public ReplaceTag()
Method Detail |
public void setMatch(java.lang.String inMatch)
inMatch
- match string.public void setReplaceWith(java.lang.String inReplaceWith)
inReplaceWith
- replaceWith string.public int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- If anything goes wrong.public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- If anything goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |