OpenWGA 5.4 - WebTML reference

WebTML tags


Description :
Loads a WebTML text label in a language that the current browser user understands.

WebTML labels are an OpenWGA feature to create multi language designs. A label is a piece of text, addressed by a key, that is available in multiple language translations. Labels are defined in the OpenWGA design, inside Java properties files that are placed in file containers named "labels_x" where x is a language code. Use this tag to retrieve them in a suitable language for the current browser user.
Derived from: Attributes:
show inherited attributes ...
Name Value(s) Purpose
container Label-Container Specifies the label container from which to retrieve the label
file labelfile Specifies the label file from which to retrieve the label
key labelkey Specifies the key of the label to retrieve
param1...param5 Text Specifies the value of a label parameter

A simple label retrieval for the title of an input field. For the english language this label will be retrieved from a Java properties file "" inside a file container "labels_en":
<tml:label key="username"/>: <tml:input name="username"/>

It is good practice to organize the labels in different label properties files for different UI regions. You determine the file name by attribute file:
<tml:label file="userform" key="username"/>: <tml:input name="username"/>

However it is tedious to determine the file again on each label when whole regions use the same. Therefor you can group functionalities using the same, non-standard, properties files with <tml:range labelfile>. You then can omit the file specification on the <tml:label> tag itself:
<tml:range labelfile="userform">
  <tml:label key="username"/>: <tml:input name="username"/> <br>
  <tml:label key="phone"/>: <tml:input name="phone"/> <br>
  <tml:label key="country"/>: <tml:input name="country" type="select" optionsitem="countries"/> <br>

This could be the text contents of the labelfile "" inside label container "labels_en":
username=User name
phone=Phone number