WEB_COMPONENT_DIRECTORY

The WEB_COMPONENT_DIRECTORY element specifies the path where Web components for an application are located.

Syntax

<WEB_COMPONENT_DIRECTORY>path [;...] </WEB_COMPONENT_DIRECTORY>
  1. path specifies a path to a web component directory. Multiple paths can be specified. The separator used between resource paths is a semi-colon, ";".

Child elements

There are no child elements.

Usage

You use this element to define paths from where Web components are served. This element value added to the URL builds the path used to find a Web component.

The WEB_COMPONENT_DIRECTORY configuration only applies to Genero Desktop Client (GDC) applications delivered via GAS, and Genero Browser Client (GBC).

Typically, the base path for Web components of applications deployed via the GAS is $(application.path)/webcomponents

If your application is intended for different front-ends, it is recommended that you place files for each Web component in separate subdirectories below a base path for Web components.

For example, if your application has a Web component called "3DChart", you must configure it as follows:
  • Set the WEB_COMPONENT_DIRECTORY entry to, for example, appdir/webcomponents in your application configuration file like this:
    <WEB_COMPONENT_DIRECTORY>appdir/webcomponents</WEB_COMPONENT_DIRECTORY>
  • In the webcomponents directory, create a subdirectory called "3DChart".

  • Place the HTML file for loading the Web component in the 3DChart subdirectory.
    Important: The HTML file that loads the Web component and the subdirectory must have the same name. In the example, the HTML file is "3DChart.html".
  • Place other files, such as JavaScript files needed by the Web component, in the 3DChart subdirectory.

The directory structure where your application is deployed would look like this:
appdir
appdir/main.42m
appdir/form1.42f
appdir/webcomponents/3DChart
appdir/webcomponents/3DChart/3DChart.html
appdir/webcomponents/3DChart/myfile.js 
Note: Genero BDL standard Web components

Genero BDL provides a set of standard Web components in $FGLDIR/webcomponents. If you want to use a standard Genero Web component and you have defined a specific WEB_COMPONENT_DIRECTORY entry in your application configuration file, you must add $(res.fgldir)/webcomponents to the WEB_COMPONENT_DIRECTORY entry.

For more information on working with Web components, see the Web components pages of the Genero Business Development Language User Guide.

Usage example

   <WEB_APPLICATION_EXECUTION_COMPONENT Id="cpn.wa.execution.local">
     ...
      <DELEGATE service="MyGroup/MyDelegateService"> ... </DELEGATE>
      <WEB_COMPONENT_DIRECTORY>$(application.path)/webcomponents;
             $(my.web.components)/static-files/webcomponents</WEB_COMPONENT_DIRECTORY>
   </WEB_APPLICATION_EXECUTION_COMPONENT>
Important: Element order. If the WEB_COMPONENT_DIRECTORY element is present, it must be set in the correct order within the parent element.

Parent elements

This element is a child of one of the following elements: