Location:  WebCFG documentation > XML specification

Config

Type: WCapp
Parent: WebCFG

Container for a metaconfiguration. Here you define the files, buttons and actions.

Attributes
Attribute Description Usage
id A unique ID that identifies the config required
enable Allowed values: true, false

If set to true, this metaconfiguration will be shown in the web frontend. When set to false it won't. Default to true.
optional
authref A reference to the authentication element that is to be used to grant access to this metaconfiguration. Reference is done by giving the name attribute's value. If not set, no login is needed to open this metaconfiguration. optional
displayname The text that should appear in the drop down box for selecting a metaconfiguration. If not set, the value from the name attribute will be used. optional
header The text that should appear in the header when this metaconfiguration is chosen. If not given, the value from the displayname attribute will be used if set, otherwise the value from the name attribute. optional
adminview Allowed values: true, false

If set to true, the user can change the display type of the configured files to raw mode. If set to false no display type change can be done.
optional
chooser Allowed values: true, false

If set to true, the wcapp dropdown box appears. If set to false the wcapp dropdown box disapears.

This attribute can be used only with the extranet license
optional
style Sets the style to use to customize WebCFG for this config only. If set, the style given in WebCFG will be overwritten.

Styles are located in ${config.dir}/styles. New styles can be created by creating a new subdirectory and place a file called webcfg.css in it. The name of the directory is the style name.

A good starting point is simply to copy the style default and apply your changes.

If this attribute is not set, the style defined in WebCFG will be used. This attribute works only with the extranet license.
optional
Child Elements
Element Description Cardinality
handlerset Declares a set of handlers that are grouped together in this metaconfiguration. 0..1
fileset Declares a set of files that are grouped together in this metaconfiguration. 0..1
buttonset Declares a set of buttons that can be used in annotations in the files defined in the fileset. 0..1
loadaction Declares an action that is invoked when this config is loaded. 0..1
varset Declares a set of variables for local use within this metaconfiguration. 0..1
Examples
<wcapp id="test" displayname="Test config" header="Test configuration">
   <loadaction execute="mkdir -p /tmp/test" />
   <fileset>
      ...
   </fileset>
   <buttonset>
      ...
   </buttonset>
</wcapp>
    	

This is a very simplistic example for a config. The internal reference name is test. In the dropdown box in the web frontend it will appear as Test config and when selected, the header will be Test configuration.

This config is enabled and no login is needed.

When this config is selected from the dropdown box, the action given in loadaction is executed before it is displayed. Here, a local directory /tmp/test will be created. This is useful in combination with the use of templates.

<wcapp id="test" displayname="Test config" header="Test configuration">
   <fileset>
      ...
   </fileset>
   <buttonset>
      <button id="save" displayname="Save" scope="global">
         <save filename="${file.filename}.webcfg" />
      </button>
   </buttonset>
</wcapp>
    	

This example shows how to define a save button. A save button has to have a save element and a global scope! Local save buttons are currently not possible.

When the save button is pressed, the configuration will be saved to the original filename with the appendix ".webcfg".

top