Class IfTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class IfTag
    extends ConditionalTagSupport

    Tag handler for <if> in JSTL's rtexprvalue library. Because of the support provided by the ConditionalTagSupport class, this tag is trivial enough not to require a separate base supporting class common to both libraries.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean test  
      • 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

      Constructors 
      Constructor Description
      IfTag()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean condition()
      Subclasses implement this method to compute the boolean result of the conditional action.
      private void init()  
      void release()
      Releases any resources this ConditionalTagSupport may have (or inherit).
      void setTest​(boolean test)  
      • 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
    • Field Detail

      • test

        private boolean test
    • Constructor Detail

      • IfTag

        public IfTag()
    • Method Detail

      • release

        public void release()
        Description copied from class: ConditionalTagSupport
        Releases any resources this ConditionalTagSupport may have (or inherit).
        Specified by:
        release in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class ConditionalTagSupport
      • condition

        protected boolean condition()
        Description copied from class: ConditionalTagSupport

        Subclasses implement this method to compute the boolean result of the conditional action. This method is invoked once per tag invocation by doStartTag().

        Specified by:
        condition in class ConditionalTagSupport
        Returns:
        a boolean representing the condition that a particular subclass uses to drive its conditional logic.
      • setTest

        public void setTest​(boolean test)
      • init

        private void init()