Home   Single Page

Choose and When

The choose and when attributes provide an alternative way for mutually exclusive conditional evaluation.

<zk choose="">
    <zk when="${fruit == 'apple'}">    

Evaluated if the when condition is true.

</zk>

<zk>

Evaluated if none of above cases matches.

</zk>

</zk>

You don't have to assign any value to the choose attribute, which is used only to identify the range of the mutually exclusive condition evaluation.