|
||||||||||
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.jstl.core.ConditionalTagSupport
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:
Field Summary |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
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 | |
ConditionalTagSupport()
Base constructor to initialize local state. |
Method Summary | |
protected abstract boolean |
condition()
Subclasses implement this method to compute the boolean result of the conditional action. |
int |
doStartTag()
Includes its body if condition() evaluates to true. |
void |
release()
Releases any resources this ConditionalTagSupport may have (or inherit). |
void |
setScope(java.lang.String scope)
Sets the 'scope' attribute. |
void |
setVar(java.lang.String var)
Sets the 'var' attribute. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, 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 |
Constructor Detail |
public ConditionalTagSupport()
Method Detail |
protected abstract boolean condition() throws JspTagException
Subclasses implement this method to compute the boolean result of the conditional action. This method is invoked once per tag invocation by doStartTag().
JspTagException
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(java.lang.String var)
var
- Name of the exported scoped variable storing the result of
condition().public void setScope(java.lang.String scope)
scope
- Scope of the 'var' attribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |