Class Unless


  • public class Unless
    extends AbstractConditional
    A close relative of the If component that inverts the meaning of its test. This is easier than an If component with the negate parameter set to true.
    Component Parameters 
    NameTypeFlagsDefaultDefault Prefix
    elseorg.apache.tapestry5.Block  literal
    An alternate org.apache.tapestry5.Block to render if #test() is false. The default, null, means render nothing in that situation.
    testbooleanRequired prop
    If true, then the body of the component is omitted. If false, the body is rendered.
    thenorg.apache.tapestry5.Block  literal
    The org.apache.tapestry5.Block to render if #test() is true. The default, null, means render the component body in that situation..
    • Constructor Summary

      Constructors 
      Constructor Description
      Unless()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected 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.

        , , , , , , , , , ,
    • Constructor Detail

    • Method Detail

      • test

        protected boolean test()
        Description copied from class: AbstractConditional
        Performs the test via the parameters; return true to render the body of the component, false to render the else block (or nothing).
        Specified by:
        test in class AbstractConditional
        Returns:
        test parameter inverted