Class TestBodyContentTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- com.microstrategy.web.app.taglibs.TestBodyContentTag
-
- 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
public class TestBodyContentTag extends javax.servlet.jsp.tagext.BodyTagSupport
This custom tag is for testing purposes only. It takes the name of a file and its path which will serve as base for comparing it against the HTML code that will be generated as body of this tag. If the contents are the same, aPASS
text will be displayed, otherwise, it will indicateFALSE
.- Since:
- MicroStrategy Web 7.3.1 or earlier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TestBodyContentTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doAfterBody()
This method is called after the JSP engine processes the body content of the tag.int
doEndTag()
Called after the JSP engine finished processing the tag.int
doStartTag()
Called when the JSP engine encounters the start tag.void
setFileName(java.lang.String value)
Specifies the file name to use for comparing the HTML output.void
setPath(java.lang.String value)
Defines the path to use for the test.boolean
shouldEvaluateRestOfPageAfterEndTag()
Evaluates if the rest of the page should be processed or not.boolean
theBodyShouldBeEvaluated()
Evaluates if the contents of the tag should be processed or not.boolean
theBodyShouldBeEvaluatedAgain()
Evaluates if the content of the tag should be processed again or not.void
writeTagBodyContent(javax.servlet.jsp.JspWriter out, javax.servlet.jsp.tagext.BodyContent bodyContent)
Processes the body content and attributes of the tag to specify what to display.-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
theBodyShouldBeEvaluated
public boolean theBodyShouldBeEvaluated()
Evaluates if the contents of the tag should be processed or not.- Returns:
True
if the body should be evaluated. Otherwise, returnsFalse
-
shouldEvaluateRestOfPageAfterEndTag
public boolean shouldEvaluateRestOfPageAfterEndTag()
Evaluates if the rest of the page should be processed or not.- Returns:
True
if the rest of the page should be processed. Otherwise, returnsFalse
-
theBodyShouldBeEvaluatedAgain
public boolean theBodyShouldBeEvaluatedAgain()
Evaluates if the content of the tag should be processed again or not.- Returns:
True
if there are more elements to display on the shortcut list. Otherwise, returnsFalse
-
writeTagBodyContent
public void writeTagBodyContent(javax.servlet.jsp.JspWriter out, javax.servlet.jsp.tagext.BodyContent bodyContent) throws java.io.IOException
Processes the body content and attributes of the tag to specify what to display.- Parameters:
out
-JspWriter
instance- Throws:
java.io.IOException
- if an error is risen when displaying the custom tag contents
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
Called when the JSP engine encounters the start tag.- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_BUFFERED if the JSP engine should evaluate the tag body, otherwise return SKIP_BODY.
- Throws:
javax.servlet.jsp.JspException
- if an error is risen when displaying the custom tag contents
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
Called after the JSP engine finished processing the tag.- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_PAGE if the JSP engine should continue evaluating the JSP page, otherwise return SKIP_PAGE.
- Throws:
javax.servlet.jsp.JspException
- if an error is risen when displaying the custom tag contents
-
doAfterBody
public int doAfterBody() throws javax.servlet.jsp.JspException
This method is called after the JSP engine processes the body content of the tag.- Specified by:
doAfterBody
in interfacejavax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_AGAIN if the JSP engine should evaluate the tag body again, otherwise return SKIP_BODY.
- Throws:
javax.servlet.jsp.JspException
- if an error is risen when displaying the custom tag contents
-
setFileName
public void setFileName(java.lang.String value)
Specifies the file name to use for comparing the HTML output.- Parameters:
value
- name of the file to use for the test
-
setPath
public void setPath(java.lang.String value)
Defines the path to use for the test.- Parameters:
value
- path to define where the file to use is located
-
-