Extending : Widget extension : Advanced topics : Creating a template for generating JS files from XUI files
  
Creating a template for generating JS files from XUI files
A template is used by the UNICOM® Digital Transformation Toolkit (UDTT™) XUI tooling to generate a .jsp file from a .xui file. The template file can include common content of a JSP page, such as charset, and CSS files and JS files. UDTT provides the following two template files, which are located in the WebContent/templates folder of an XUI Web project.
Note The WebContent/templates folder can be configured in the XUI Default Settings page of the XUI Web Project Properties window.
template_debug.ftl
Enables the ECA debug console for debugging purposes.
template_ftl
Disables the ECA debug console for higher performance at runtime.
Technical developers can implement and store project specific template files in the WebContent/templates folder. When the XUI tools generate a JSP file from an XUI file, all the template files in the WebContent/templates folder will be displayed for selection. The template files should follow FreeMarker specification, so standard FreeMarker directives can be used in template files.
The following variables are supported in template files:
content
Represents the all content in text format of a specific JSP file.
user
The user who generates JSP file.
date
The date on which a JSP file is generated.
cssFiles
The CSS files that are included in the JSP file.
xui_file
The XUI file that is used to generate the JSP file.
js_file
The JS files that are included in the JSP file.
encoding
The charset of the JSP page.
For more information on FreeMarker template schema, see http://freemarker.sourceforge.net/docs/dgui_quickstart_template.html.
Go up to
Advanced topics