public abstract class ConditionalTagSupport extends TagSupport
Abstract class that facilitates implementation of conditional actions where the boolean result is exposed as a JSP scoped variable. The boolean result may then be used as the test condition in a <c:when> action.
This base class provides support for:
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
ConditionalTagSupport()
Base constructor to initialize local state.
|
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Includes its body if condition() evaluates to true.
|
void |
release()
Releases any resources this ConditionalTagSupport may have (or inherit).
|
void |
setScope(String scope)
Sets the 'scope' attribute.
|
void |
setVar(String var)
Sets the 'var' attribute.
|
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
public ConditionalTagSupport()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
- if an error occurs while processing this tagTag.doStartTag()
public void release()
release
in interface Tag
release
in class TagSupport
Tag.release()
public void setVar(String var)
var
- Name of the exported scoped variable storing the result of
condition().public void setScope(String scope)
scope
- Scope of the 'var' attributeCopyright © 2010 - 2020 Adobe. All Rights Reserved