GBC

The GBC element specifies a customization directory for the Genero Browser Client (GBC) front-end.

Note: In versions of the GAS before 3.10, the GBC element was known as GWC-JS. Both names continue to be supported.

Syntax

<GBC>dir-file-name</GBC>
  1. The dir-file-name can be either the name of a directory or a file.

Child elements

There are no child elements.

Usage

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

The Genero Application Server (GAS) searches for the dir-file-name in GBC_LOOKUP_PATH paths. If found, it is processed as determined by these conditions:
  • If it is a directory, it is expected to be a GBC installation.
  • If it is a file, then the file is expected to contain one text line, giving the name of a directory located in the same directory as the file. This directory is expected to be a GBC installation.

Usage example: default application

The bootstrap directories are defined in the $(res.gbc) resource. The GBC element in the defaultwa abstract application configuration 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"/>
    <GBC>$(res.gbc)</GBC>
  </UA_OUTPUT>
</APPLICATION>
The value of the $(res.gbc) is set by $(res.gwc-js) in the as.xcf file to reference the "_default" file. This file is located in the $(res.fgldir)/web_utilities/gbc directory, which refers to the $FGLDIR/web_utilities/gbc/gbc directory.
 <RESOURCE Id="res.gwc-js" Source="INTERNAL">_default</RESOURCE>
 <RESOURCE Id="res.gbc" Source="INTERNAL">$(res.gwc-js)</RESOURCE>
Note: If the _default file content is changed, the next application started referencing the $(res.gwc-js) resource uses this new value.

Usage example: customization project directory

<GBC>gbc-custom</GBC>

In this example, you create a new set of files to customize the look and feel of a Web application. You place these files in a separate directory to the default bootstrap. In this example, that file is $(res.path.as)/gbc-custom. The GAS searches for the GBC directory at paths defined by the GBC_LOOKUP_PATH.

Usage example: customization file

<GBC>customization_file</GBC>

A text file (customization_file in the example) is used to specify a customization directory. Paths defined by the GBC_LOOKUP_PATH element, are searched to locate the customization_file.

The first line of the file must contain the name of a directory located in the same directory as the file, where a GBC customization installation is found.

URI gbc query string parameter

The customization directory can also be provided in the application URL using the gbc query string parameter. If the URI contains a gbc query string and value, this takes precedence over the configuration for the GBC element in the application configuration file (xcf).
Note: In the Genero web client prior to version 3.00, the parameter gwc-js was used. From version 3.10, it is renamed gbc. Use of gwc-js is deprecated but remains for compatibility.

See Set GBC customization in URL parameter.

Parent elements

This element is a child of UA_OUTPUT