You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
Introduction
The MVC UI has two default themes (Forms theme and Dashboard theme) and has support for custom made themes. A theme is basically a set of files and some configuration that consists of the following components:
Description | Location | |
---|---|---|
Index file | StringTemplate index file | JAR or spring.config.additional-location |
Web resources | JavaScript, CSS, images, etc. | JAR or spring.config.additional-location |
Configuration | Properties in the aquima.properties file | spring.config.additional-location |
A theme can be part of a custom plugin JAR (for example the Dashboard plugin) but can also just be a collection of files located in spring.config.additional-location
.
Getting started
The base of a theme is the index file from which the main page is build. Blueriq uses a template engine called StringTemplate to make server properties available in the client. A default Blueriq index page is injected with a template context that features the following properties:
Property | Type | Description |
---|---|---|
theme | String | Name of the theme currently selected |
apiBasePath | String | Base path for the web API |
webResourcesBasePath | String | Base path for web resources |
extensions | Object (ExtensionContext) | Contains all registered CSS and JavaScript files |
developmentMode | boolean | Indicates whether or not the application runs in development mode |
sessionTimeout | int | Configured session timeout in seconds |
Configuration
In order to configure your theme so it will be known by the Runtime several properties must be set. The following example shows properties for registering a theme named "custom_dashboard":
mvc.themes=custom_dashboard mvc.custom_dashboard.templateGroupFile=UI/mvc/custom_dashboard.stg mvc.custom_dashboard.templateName=main