org.zkoss.web.servlet.dsp.action
Class If

java.lang.Object
  extended by org.zkoss.web.servlet.dsp.action.AbstractAction
      extended by org.zkoss.web.servlet.dsp.action.If
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 Summary
If()
           
 
Method Summary
 boolean getTest()
          Returns the test result.
 boolean isTrim()
          Returns whether to trim the result.
 void render(ActionContext ac, boolean nested)
          Processes the action and renders the output to ActionContext.getOut().
 void setTest(boolean cond)
          Sets the test result.
 void setTrim(boolean trim)
          Sets whether to trim the result.
 java.lang.String toString()
           
 
Methods inherited from class org.zkoss.web.servlet.dsp.action.AbstractAction
append, append, append, getIf, getUnless, isEffective, setIf, setUnless, toScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

If

public If()
Method Detail

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,
                   java.io.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
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo