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

<EXECUTION AllowUrlParameters="FALSE">
   <ENVIRONMENT_VARIABLE Id="FGLDIR">$(res.fgldir)</ENVIRONMENT_VARIABLE>
   <PATH>$(res.deployment.path)</PATH>
   <DVM>$(res.dvm.wa)</DVM>
   <MODULE>myapp.42m</MODULE>
   <WEB_COMPONENT_DIRECTORY>webcomponents</WEB_COMPONENT_DIRECTORY>
   <ACCESS_CONTROL>
     <ALLOW_FROM>$(res.access.control)</ALLOW_FROM>
   </ACCESS_CONTROL>
   <UA_OUTPUT>
     <PUBLIC_IMAGEPATH>$(res.public.resources)</PUBLIC_IMAGEPATH>
     </TIMEOUT>
     <GBC>$(res.gbc)</GBC>
     <GDC_SHORTCUT>$(res.deployment.path)/tpl/shortcut/gdc-http.gdc</GDC_SHORTCUT>
   </UA_OUTPUT>
   </DELEGATE>
</EXECUTION>

Parent elements

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