OpenWGA 7.9 - WebTML reference

WebTML tags » case

<tml:case value ="number | string">

Purpose:

Defines the value to compare to the 'switch' value of the surrounding <tml:select>.

Description:

This attribute is used together with the switch variant of <tml:select>.

The value specified in this attribute will be compared to the result of the TMLScript expression of the 'switch' attribute on the <tml:select>. If the value matches the body of <tml:case> is evaluated.

The attribute value can be a number or a text. If the switch result is a number the number values will be compared otherwise a string compare will be performed.

Value(s):

number or string

Examples:

<tml:select switch="some-item">
    <tml:case value="de"> ...
    <tml:case value="1"> ...
    <tml:case value="2.5"> ...
</tml:select>