org.appng.taglib

## Class If

- java.lang.Object
- - javax.servlet.jsp.tagext.TagSupport
  - - org.appng.taglib.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 and Description
    `If()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `doStartTag()`
    `String` | `getCondition()`
    `void` | `setCondition(String condition)`

    - ### Methods inherited from class javax.servlet.jsp.tagext.TagSupport

      `doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, 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

    - #### 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)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.