Page History
Initial Page
The purpose of the initial page is to load all the required resources (eg javascript or css) and to provide a base layout.
StringTemplate is used as the template engine, the main template file is expected to be:
- A Template Group File: meaning multiple templates can be used and referred to.
- The main template name has the context as parameter. The name of the main template can be configured.
The Main Template accepts the context parameter. On this object the following properties are available:
- theme: The name of the current theme
- apiBasePath: The path to the root of the web api
- webResourcePath: The path to the root of the webresources
- extensions: The extension context with the following properties:
- cssExtensionUrls: List of custom css files
- jsExtensionUrls: List of custom javascript files
- sessionId: The id of the current session
- currentPage: Content object of the current page
- currentPageJson: Current page serialized in json form
- isDevelopmentMode: Indicator whether the development mode is activated.
- sessionTimeout: session timeout in milliseconds
Configuration
In java the following options can be configured in the aquima.properties file:
Code Block |
---|
mvc.themes=forms,dashboard
mvc.forms.templateGroupFile=UI/mvc/forms.stg
mvc.forms.templateName=main
mvc.dashboard.templateGroupFile=UI/mvc/dashboard.stg
mvc.dashboard.templateName=main
mvc.developmentMode=true |
The corresponding configuration in .net:
Code Block | ||||
---|---|---|---|---|
| ||||
<webApplication>
...
<!-- UI -->
<ui>
...
<mvc developmentMode="true">
<themes>
<theme name="forms" templateGroupFile="UI/mvc/forms.stg" templateName="main"/>
<theme name="dashboard" templateGroupFile="UI/mvc/dashboard.stg" templateName="main"/>
</themes>
</mvc>
</ui>
</webApplication> |
Rendering
The mvc UI does not restrict to a particular mvc framework. However Blueriq has chosen for Knockout for the implementation of our default themes.
Blueriq provides the forms and dashboard theme. Themes can be developed from the ground up or the default themes can be extended/customized.
After the initial page is loaded the knockout implementation retrieves it's data via the json web api. This data is transformed using the knockout mvc framework.