GWC-JS

The GWC-JS element defines the customization directory for the Genero Web Client for JavaScript (GWC-JS) front-end.

Syntax

<GWC-JS>gwc_js_dir</GWC-JS>
  1. Where gwc_js_dir is the name of a directory.

    The Genero Application Server (GAS) searches for this directory in GWC_JS_LOOKUP_PATH paths. If gwc_js_dir is found, it is expected to be a GWC-JS installation containing the bootstrap file (bootstrap.html).

Usage

You use this element to specify a customization directory for the GWC-JS. This directory contains a collection of HTML, CSS, JavaScript files, and all the resources required for rendering Web applications.

Usage example: default application

One or more customization directories are provided at GAS installation, and the default one is defined in the $(res.gwc-js) resource. The GWC-JS element in the defaultwa abstract application configuration in the GAS configuration file references this resource:
...
<APPLICATION Id="defaultwa" Abstract="TRUE">
<!-- This is the "default" application.
 It is not used directly: it is used for defining a "root" application. -->
  <EXECUTION Using="cpn.wa.execution.local"/>

  <UA_OUTPUT>
    <PROXY>$(res.uaproxy.cmd)</PROXY>
    <PUBLIC_IMAGEPATH>$(res.public.resources)</PUBLIC_IMAGEPATH>
    <TIMEOUT Using="cpn.wa.timeout"/>
    <GWC-JS>$(res.gwc-js)</GWC-JS>
  </UA_OUTPUT>
...
The value of the $(res.gwc-js) resource is set by default in the as.xcf file to the "gwc-js" directory, which is located in the GAS installation directory, $(res.path.as).
 <RESOURCE Id="res.gwc-js" Source="INTERNAL">gwc-js</RESOURCE>

Usage example: customization project directory

<GWC-JS>gwc-js-custom</GWC-JS>

In this example, you create a new set of files to customize the look and feel of a Web application in a separate directory to the default bootstrap, for example, $(res.path.as)/gwc-js-custom. The GAS searches for the GWC-JS directory at paths defined by the GWC_JS_LOOKUP_PATH.

URI gwc-js query string parameter

The customization directory can also be provided in the application URL using the gwc-js query string parameter. If the URI contains a gwc-js query string and value, this takes precedence over the configuration for the GWC-JS element in the application configuration file (xcf). See Set gwc-js customization with query string parameter.

Child elements

There are no child elements.

Parent elements

This element is a child of the following elements: UA_OUTPUT