OpenWGA 7.11 - WebTML reference

WebTML tags » [All condition tags]

<tml:[All condition tags] condition ="expression">


Tests a custom TMLScript expression


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)


A custom TMLScript expression


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"...