| |
|
| java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.jstl.core.ConditionalTagSupport
All known Subclasses: org.apache.taglibs.standard.tag.common.xml.IfTag, org.apache.taglibs.standard.tag.el.core.IfTag, org.apache.taglibs.standard.tag.rt.core.IfTag, org.apache.taglibs.standard.tag.common.core.WhenTagSupport,
ConditionalTagSupport | abstract public class ConditionalTagSupport extends TagSupport (Code) | | 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:
- Conditional processing of the action's body based on the returned value
of the abstract method condition().
- Storing the result of condition() as a Boolean object
into a JSP scoped variable identified by attributes var and
scope.
author: Shawn Bayern |
Method Summary | |
abstract protected boolean | condition() Subclasses implement this method to compute the boolean result
of the conditional action. | public int | doStartTag() Includes its body if condition() evaluates to true. | public void | release() Releases any resources this ConditionalTagSupport may have (or inherit). | public void | setScope(String scope) Sets the 'scope' attribute. | public void | setVar(String var) Sets the 'var' attribute. |
ConditionalTagSupport | public ConditionalTagSupport()(Code) | | Base constructor to initialize local state. As with TagSupport,
subclasses should not implement constructors with arguments, and
no-argument constructors implemented by subclasses must call the
superclass constructor.
|
condition | abstract protected boolean condition() throws JspTagException(Code) | | Subclasses implement this method to compute the boolean result
of the conditional action. This method is invoked once per tag invocation
by doStartTag().
a boolean representing the condition that a particular subclassuses to drive its conditional logic. |
doStartTag | public int doStartTag() throws JspException(Code) | | Includes its body if condition() evaluates to true.
|
release | public void release()(Code) | | Releases any resources this ConditionalTagSupport may have (or inherit).
|
setScope | public void setScope(String scope)(Code) | | Sets the 'scope' attribute.
Parameters: scope - Scope of the 'var' attribute |
setVar | public void setVar(String var)(Code) | | Sets the 'var' attribute.
Parameters: var - Name of the exported scoped variable storing the result ofcondition(). |
|
|
|