All Implemented Interfaces:
Action

public class If extends AbstractAction
Tests whether an condition is true and render the child only if the condition is true.
Author:
tomyeh
  • Constructor Details

    • If

      public If()
  • Method Details

    • getTest

      public boolean getTest()
      Returns the test result.
    • setTest

      public void setTest(boolean cond)
      Sets the test result.
    • isTrim

      public boolean isTrim()
      Returns whether to trim the result.

      Default: true.

    • setTrim

      public void setTrim(boolean trim)
      Sets whether to trim the result.
    • render

      public void render(ActionContext ac, boolean nested) throws DspException, IOException
      Description copied from interface: Action
      Processes the action and renders the output to ActionContext.getOut().
      nested - whether there is any nested content.
      Throws:
      DspException
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object