org.chenillekit.tapestry.core.components.Equals

Conditionally renders its body.

[JavaDoc]

Component Parameters

Name Type Flags Default Default Prefix Description
else org.apache.tapestry5.Block NOT Allow Null prop An alternate org.apache.tapestry5.Block to render if the test parameter is false. The default, null, means render nothing in that situation.
left Object Required, NOT Allow Null prop If true, then the body of the If component is rendered. If false, the body is omitted.
negate boolean NOT Allow Null prop Optional parameter to invert the test. If true, then the body is rendered when the test parameter is false (not true).
right Object Required, NOT Allow Null prop

Examples

This example describe how to use the Equals component.

MyPage.tml

                    
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <body>
        <h1>Hello Guys and Dolls</h1>

            <span t:type="ck/Equals" left="literal:value1" right="literal:value2" else="block:dolls">
                this content should never display, because "value1".equals("value2") returns false
            </div>

            <t:block id="dolls">
                this should shown instead of the content of component Equals
            </t:block>

    </body>
</html>

                

Back to index