OpenWGA 7.10 - OpenWGA Concepts and Features

Design and development » Design directories

Script modules in folder "scripts"

The folder "script" holds definitions of script modules.

Below the folder "scripts" there may be five different subdirectories that categorize the module files according to the allowed code types:

  • js (Javascript)
  • css
  • xml
  • tmlscript

Inside these folders there may be files where each represents a separate script module. The suffix of these module files must be identical to the type folder it is contained in. Create new script modules just by creating a text file with a matching suffix inside one of these code type directories (or use the "New... > WGA Script Module" functionality from OpenWGA design studio). The script name of the file, which you need when addressing the module from WebTML,  will be the file name without suffix. Equally you just may delete a script module by deleting its module file.

Script modules may be organized in subdirectories below those code type directories. The names of modules in those subdirectories, that are needed when referencing them in WebTML, consists of the names of those subdirectories plus the file name, again without suffix, where name and folder names are divided by colons ":". See Design References for more details on this addressing scheme.

For example a module file stored inside:

scripts/xml/basicdata/home/info.xml

Is referenced in OpenWGA design by this name

basicdata:home:info

Note that neither the suffix ".xml" is part of the module name, nor is the type folder "/scripts/xml". Both just identify the file as script module of code type "xml". See Design References for more details on this addressing scheme.

A special subdirectory named "metadata" may exist in each script folder, even in subfolders. These hold metadata definitions for the script modules in XML format. You should not edit these files manually but rather use the "Properties"-Dialog of each module file or the embedded controls to their editor to modify script module metadata.