Class If

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

    public class If
    extends javax.servlet.jsp.tagext.TagSupport
    Processes the taglet's body if the given condition evaluates to be true. In the condition, any request parameter can be used. Since the condition is evaluated by an ExpressionEvaluator, the JSP expression language needs to be used.

    Usage:

     <!-- assumed there's a request parameter named 'foo'-->
     <appNG:if condition="foo eq 'bar'">Bar!</appNG:if>
     
    Author:
    Matthias Herlitzius
    See Also:
    ExpressionEvaluator, Serialized Form
    • 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

      Constructors 
      Constructor Description
      If()  
    • Constructor Detail

      • If

        public If()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException
      • getCondition

        public String getCondition()
      • setCondition

        public void setCondition​(String condition)