org.apache.tapestry5.corelib.base

## Class AbstractConditional

- java.lang.Object
- - org.apache.tapestry5.corelib.base.AbstractConditional

- Direct Known Subclasses:
    If, Unless

      @SupportsInformalParameters
      public abstract class AbstractConditional
      extends Object

  Base class for `If` and `Unless`. Will render its body or the block from its else parameter. If it renders anything and it has an element name, then it renders the element and its informal parameters.

  Component Parameters
  Name | Type | Flags | Default | Default Prefix
  --- | --- | --- | --- | ---
  else | org.apache.tapestry5.Block |  |  | literal
  An alternate org.apache.tapestry5.Block to render if org.apache.tapestry5.corelib.base.AbstractConditional#test() is false. The default, null, means render nothing in that situation.
  then | org.apache.tapestry5.Block |  |  | literal
  The org.apache.tapestry5.Block to render if org.apache.tapestry5.corelib.base.AbstractConditional#test() is true. The default, null, means render the component body in that situation..

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractConditional()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract boolean` | `test()` Performs the test via the parameters; return true to render the body of the component, false to render the else block (or nothing).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractConditional

          public AbstractConditional()

  - ### Method Detail

    - #### test

          protected abstract boolean test()

      Performs the test via the parameters; return true to render the body of the component, false to render the else block (or nothing).
      Returns:
        true to render body

5.6.1 - Copyright © 2003-2020 The Apache Software Foundation.