Configure FX Mobile
You can override the FX Mobile default configuration using external configuration.
Editing external configuration files
You can override the configuration set in FX Mobile’s internal configuration files AppConfig.json
, BlotterConfig.json
, Subjects.json
with configuration set in external configuration files ExtendedAppConfig.json
, ExtendedBlotterConfig.json
, and Subjects.json
.
FX Mobile looks for external configuration files in the /resources
directory of FX Mobile’s web application context.
Follow the steps below:
-
Mount an external directory on the
/resources
directory in FX Mobile’s web application context. See the manual for your web application server for instructions on how to do this.For example, in Apache Tomcat, the following configuration mounts the
../conf/resources
directory on the/resources
directory in the web application context:Apache Tomcat 8<Context> ... <Resources> ... <PostResources className="org.apache.catalina.webresources.DirResourceSet" base="../conf/resources" webAppMount="/resources" /> ... </Resources> ... </Context>
-
Create two files in the external directory:
-
../conf/resources/ExtendedAppConfig.json
-
../conf/resources/ExtendedBlotterConfig.json
-
The external configuration files use the same formats as their equivalent internal configuration files, as documented in Application configuration and Blotter configuration.
Editing internal configuration files
You can edit FX Mobile’s configuration files in the WAR file. This is the only way to edit configuration files, and the only way to edit i18n dictionaries.
From FX Mobile 4.0.0, configuration files are stored under the static/
directory.
File | Description |
---|---|
|
|
|
|
|
|
|
Locale dictionaries |
WAR files are compressed using the ZIP algorithm. Suitable utilities for working with WAR files include 7-Zip and the GNU zip utility (package 'zip' on RHEL).
Follow the steps below:
-
Extract the configuration file from the FX Mobile WAR:
$ unzip mobile-<version>.war '*/<filename>'
-
Edit the configuration file with a text editor:
$ vim <config-file-path>
-
Update the configuration file in the FX Mobile WAR:
$ zip mobile-<version>.war <config-file-path>
For example, to edit the AppConfig.json
file for FX Mobile-4.0.0:
$ unzip mobile-4.0.0-45945-b656d7eb25.war '*/AppConfig.json'
Archive: mobile-4.0.0-45945-b656d7eb25.war
inflating: static/4.0.0-45945-b656d7eb25/AppConfig.json
$ vim static/4.0.0-45945-b656d7eb25/AppConfig.json
$ zip mobile-4.0.0-45945-b656d7eb25.war static/4.0.0-45945-b656d7eb25/AppConfig.json
updating: static/4.0.0-45945-b656d7eb25/AppConfig.json
(deflated 70%)
Configuring blotters
This section provides an overview of how to perform common blotter configuration tasks. This should be read in conjunction with the more detailed information in Blotter configuration.
Adding a new blotter
To add a new blotter to FX Mobile:
-
If the blotter is populated by a new subject, ensure that the subject’s records conform to the record specification expected by FX Mobile.
-
Edit the blotter configuration file. Add a blotter configuration object to the ORDER_BLOTTERS or TRADE_BLOTTERS associative array.
-
Edit the locale dictionaries. Add entries for the blotter’s name and shield message. For more information, see Changing a blotter’s name and shield message.
Removing an existing blotter
To remove an existing blotter:
-
Edit the
/public/<version>/BlotterConfig.json
file. Remove the blotter’s configuration object from the ORDER_BLOTTERS or TRADE_BLOTTERS associative array. -
[Optional] Edit the locale dictionaries. Remove entries for the blotter’s name and shield message.
Re-ordering blotter tabs
To change the display-order of blotter tabs, change the order in which the configuration objects are declared in the ORDER_BLOTTERS and TRADE_BLOTTERS associative arrays. Blotter tabs are displayed, from left-to-right, in the order in which they are declared within these two arrays.
Changing a blotter’s name and shield message
The blotter’s name and shield message are localised. To change a localised name and shield message for a blotter, edit the dictionary for the locale and change the values of the i18n keys below:
-
Blotter name: edit the value of the i18n key
mobile.global-nav-menu.<NAME>
, where<NAME>
is the value of the blotter’s NAME configuration property. -
Blotter shield message: edit the value of the i18n key
mobile.blotter.shield.no.<SHIELD_MESSAGE>
, where<SHIELD_MESSAGE>
is the value of the blotter’s SHIELD_MESSAGE configuration property.
For more information on the NAME and SHIELD_MESSAGE blotter configuration properties, see Blotter configuration.
For more information on locating and editing FX Mobile’s locale dictionaries, see Editing configuration files.
See also: