OpenWGA 7.10 - WebTML reference
WebTML tags » [All condition tags]<tml:[All condition tags] condition ="expression">
Purpose:
Tests a custom TMLScript expression
Description:
The result of the TMLScript expression determines if the condition is true. All result values regarded as true in JavaScript will result in a succeeding test,. This in fact includes all possible values in JavaScript but the following:
- Boolean false itself
- 0 (Zero)
- null
- undefined
- an empty string ""
- NaN (Not a number)
Value(s):
A custom TMLScript expression
Examples:
A simple expression testing the item "name" for a special name. Note that we use the single quote as string delimiter inside the condition as using double quotes would instead end the value of the condition attribute, resulting in a syntax error:
<tml:case condition=" name=='Schmidt' ">
...Code executed if the item name matches "Schmidt"...
</tml:case>