Class AbstractIfTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- com.microstrategy.web.app.taglibs.AbstractIfTag
-
- 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
- Direct Known Subclasses:
IfBeanValueTag
,IfConnectionValueTag
,IfDisplayMoreTag
,IfErrorValueTag
,IfFeatureTag
,IfPlainTextExportTag
,IfShowAdminPageTag
,IfTemplateValueTag
,IfUseIframeTag
public abstract class AbstractIfTag extends javax.servlet.jsp.tagext.BodyTagSupport
This class can be used as base of the custom tags that evaluate a condition given the type of custom tag requested and the attributes specified. These tags have two possible children:ElseTag
andThenTag
. If the condition evaluated returns aTrue
value, the body inside theThenTag
custom tag will be rendered to the user, if it returns aFalse
then the body inside theElseTag
tag will be displayed.
The custom tags that extend this class shall have defined a helper extending theAbstractIfTagHelper
class.- Since:
- MicroStrategy Web 7.3.1 or earlier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractIfTag()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
Called after the JSP engine finished processing the tag.int
doStartTag()
Process the start tag for this instance.boolean
getCondition()
Get the value of the condition once it has been evaluated.abstract AbstractIfTagHelper
getHelper()
Method for retrieving the helper related with the tag.-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, 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
-
getHelper
public abstract AbstractIfTagHelper getHelper() throws MSTRCheckedException
Method for retrieving the helper related with the tag.- Returns:
- An instance from
AbstractIfTagHelper
which will take care of processing and rendering the HTML contents related with this tag. - Throws:
MSTRCheckedException
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
Process the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before.
Note: This method returnsEVAL_BODY_INCLUDE
, which will cause the JSP container to evaluate this tag's body directly into the existing out stream. If a subclass needs access to the body contents, it can override this method to call the superclass method and then returnEVAL_BODY_BUFFERED
. The body contents can then be accessed from an overriddendoAfterBody
method. See the JSP documentation for more details.- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_INCLUDE.
- Throws:
javax.servlet.jsp.JspException
- if an error is thrown when displaying the custom tag contents
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException, javax.servlet.jsp.JspException
Called after the JSP engine finished processing the tag. It's only objective is to clear up the tag after it has been rendered. If overwritten by a child instance, it should itself take care of calling the releaseTag() method.- 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
-
getCondition
public boolean getCondition()
Get the value of the condition once it has been evaluated.- Returns:
- a
boolean
value with the result of the evaluation of the condition requested.
-
-