Sprache wechseln / change language to: Deutsch

TMLScript reference home

Introduction

tmlscript is the expression language of WebTML. Expression languages in WebTML are used where complexe conditions have to be evaluated or small programmes have to be executed. It can be employed at the following points:

  • in the tag tml:evaluate as content
  • in the condition attribute of selection tags such as tml:case, tml: if and tml:elseif
  • in the expression attribute of tml:groupchange
  • in the sortexpression attribute of tml:foreach
  • in all attributes as long as their content is sourrounded by "{" and "}"

TMLScript in the end is a dialect of JavaScript in version 1.5. Only two things differ:
  • tmlscript is, other than JavaScript not executed in browsers but is executed on the Webserver when WebTML is rendered
  • In tmlscript the browser objects window, document, etc are not available. Initially there is only one single object type called. This object type represents the tag-context of the current WebTML tag and can be used to retrieve further objects. This one can be accessed by the keyword "this".
    (Nevertheless, the basic objects of JavaScript which do not belong to the browser, such as array, date, math, regexp etc. are available in tmlscript as well.)

Utilisation

As mentioned above, a TMLContext object corresponds the tag context of a WebTML tag. In tmlscript it is used the same way as the browser objects document and window are used in JavaScript. Only difference is that the TMLContext object has diffenent methods that are useful for WebTML. Many of these methods are equal to the functionality of WebTML tags that can only be employed here in a procedural approach. Please see the following chapters for further details.

Organisation of the reference

On the left navigator the available TMLScript objects are shown on the first level. If you click on an object tthe text level opens revealing the methods and fields of the clicked object.