A database reference is a string which uniquely adresses a database in OpenWGA. A database reference can be used anywhere in WebTML and TMLScript where a database key is expected.
The most common database reference is the database key itself, which identifies an OpenWGA application or data source by the key that was given to it on the current OpenWGA installation.
<tml:url db="mysite" doc="images" file="logo.jpg"/>
Database keys are simple strings, determined by the adminstrator that configured the app or data source in OpenWGA admin client:
Besides using the database key itself a designer has the choice to use the following alternative database reference types:
If the database you want to reference is an OpenWGA plugin you may also use a "plugin shortcut". This is a shortcut name that you define in the design configuration of your design (see Tab "Design Shortcuts") and may use in your WebTML to address the currently installed plugin it adresses.
The plugin shortcut has advantages over the adressation via database key when a plugin is adressed:
- You are independent from the database key of the plugin, which is determined automatically and may be different on different installations.
- The plugin shortcut may be much shorter than the plugins database key or name
See the following defined shortcut from a design configuration:
The shortcut "afw" is here bound to the plugin "de.innovationgate.wga-app-framework", which is the unique name of the OpenWGA default plugin "OpenWGA application framework". It contains many standard icons and is therefor often referenced from other OpenWGA designs.
To address anything inside the plugin app you now can use the shortcut prefixed with an at-sign "@" wherever a database key is expected:
<tml:image db="@afw" doc="icons" file="page.png"/>
Content Store UUID
You can find out the UUID of any content store in OpenWGA admin client by opening the configuration of the web app which uses the content store and clicking button "Runtime info" to the top right. On the info dialog you find the UUID right at the top.
To adress anything inside this content store you now can use the UUID prefixed with a hash sign "#" wherever a database key is expected:
<tml:image db="#5dd55a8c-9a86-4a6e-94bd-63458b76f9af" doc="images" file="image.png"/>