Deploy application resources for GWC for HTML5

To enable access to your images and Web components add them to one of the default directories.

This topic describes features the GAS provides for deploying resources with applications for GWC HTML5v1 applications.

Deploying application images for GWC for HTML5

By default, the GAS looks for images in $FGLASDIR/pic and in the application directory (defined by the PATH element). To quickly enable access to your images, add them to one of these directories.

The default image directory is set by the WEB_APPLICATION_PICTURE_COMPONENT element, see WEB_APPLICATION_PICTURE_COMPONENT.

For example, if you are deploying an application using GWC for HTML5, this WEB_APPLICATION_PICTURE_COMPONENT defines the default image directory:
<WEB_APPLICATION_PICTURE_COMPONENT Id="cpn.gwc.html5.picture">
  <PATH Id="Resource" Type="WEBSERVER">$(connector.uri)/fjs</PATH>
  <PATH Id="Image" Type="APPSERVER" 
   ExtensionFilter="$(res.image.extensions);.less;.svg">
    $(res.path.tpl.html5)/img;$(res.path.pic);$(application.path)</PATH>
  <PATH Id="SetHtml5" Type="APPSERVER"
   ExtensionFilter="$(res.web.extensions);.less;.svg"
   DVMFallbackAllowed="FALSE">$(res.path.tpl.html5);$(res.path.tpl.common)</PATH>
   
</WEB_APPLICATION_PICTURE_COMPONENT>
Note: For your legacy GWC-HTML5 applications, the WEB_COMPONENT_DIRECTORY configuration entry is ignored. Web components in this case are still required to be located in FGLASDIR/web/components as before. For more details on web component usage, see the Genero Business Development Language User Guide.
To explicitly override with an image path specific to the application, add a PICTURE element to the application configuration file. In this example, a PICTURE path is added for the GWC for HTML5 theme:
<APPLICATION Parent="defaultgwc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/2.50/cfextwa.xsd">
  <RESOURCE Id="application.path"
   Source="INTERNAL">$(res.path.demo.app)/card/src</RESOURCE>
  <EXECUTION>
    <PATH>$(res.path.demo.app)/card/src</PATH>
    <MODULE>card.42r</MODULE>
  </EXECUTION>
  <OUTPUT>
    <MAP Id="DUA_HTML5">
   <PICTURE>
        <PATH Id="Image" Type="APPSERVER">
          $(res.path.demo.app)/card/src/photo;
          $(res.path.pic);$(application.path)</PATH>
      </PICTURE>
    </MAP>
  </OUTPUT>
</APPLICATION>