Adding a Web Client Application / Using External Application Configuration Files |
A group defines an alias for a directory where application configuration files can be stored. The alias is used in the application URL, letting the Genero Application Server (GAS) know where to find the application configuration file.
A group consists of a alias (Id) and a directory (path). When a front-end requests an application whose configuration information is stored in an external application configuration file, it provides the group alias, which directs the GAS to the directory where the application configuration file sits. The application name identifies which application configuration file to read (as the application and the configuration file share the same name). A GROUP element can be added to the APPLICATION_LIST component within the GAS configuration file.
<GROUP Id="groupId"> path </GROUP>
You can use application groups to organize your applications into logical groups or a hierarchy. For example, consider this URL:
http://<server>/gas/wa/r/accounting/app1
<GROUP Id="accounting">/path/config/accounting</GROUP>
In this directory, the GAS expects to find a file whose name matches the name of the application with an xcf suffix. For this example, the GAS would be looking for a file named app1.xcf.
The GAS configuration file provides a default group, defined using the name _default. When an application configuration file is added to this group, the application URL can omit using a group name and simply reference the application. For example, consider this URL:
http://server/gas/wa/r/Edit
<GROUP Id="_default">$(res.path.app)</GROUP>
The resource $(res.path.app) resolves to FGLASDIR/app. In this directory, you would expect to find Edit.xcf, the Edit application's application configuration file.
<GROUP Id="_default">$(res.path.app)</GROUP> <GROUP Id="myapp">$(res.path.app)/myapp</GROUP>
<GROUP Id="demo">$(res.path.demo.app)</GROUP>
This example assigns the alias demo to the directory containing the external application configuration files for demo applications. The path is defined using a resource $(res.path.demo.app). By wisely using a resource, a change to the directory structure only requires a change to a single RESOURCE element in the configuration file.
To access an application that has its configuration file stored in the group directory, enter an application URL that includes the group alias in its path: http://server/gas/wa/r/demo/CardStep1
Based on this URL, the GAS would expect to find the configuration file CardStep1.xcf within the directory specified for the demo group.