Hexagon Geospatial
MENU

Developers Knowledge Base

GeoMedia Smart Client Workflow Manager provides tools for building and delivering highly-constrained, map-based workflows for the office or the field.
Showing results for 
Search instead for 
Do you mean 

Views and Templates

by Technical Evangelist ‎04-12-2016 02:35 AM - edited ‎04-13-2016 05:56 AM (979 Views)

The GraphicalUserInterface (GUI) of a Workflow is build with Views and Templates. They define the structure of the html markup and the widgets. This section is about the concept and the usage of Views and Templates in Workflows.

 

Views_Templates.jpg

 

Views

Based on the controller-attribute of the workflow node the corresponding View is getting loaded. According to the three different Controllers Workflow, List and Form we offer three different Views. Like in common ASP.NET MVC we follow the same idea to seperate layout, structure and content. The RootMasterView describes the structure of the html-markup and seperates the GUI in different sections. The SiteMasterView describes the content of some consistent sections, like the Navigationbar and the Historybar . The variable sections are defined by one of the three Views. The View is loading, depending on the definition of the form, the corresponding Templates to build up the GUI.

Views_and_Templates_Views.jpg

 

Structure and layout of a simple Form

ViewsStructureLayout.png

 

 

Templates

Templates are stored in the same directory like views, they are also C#-Html Files (.cshtml) but they differ in usage. Views are always linked with the workflow controller and templates are linked with forms and lists. For a better understanding of the usage of templates we seperated it into two parts, Structure and Widget templates.

 

Views_and_Templates_Templates.jpg

Structure Templates

The templates Filter, Form, Tab, Group and Singlerow define the structure of the GUI. Except the Group and Singlerow Template, all other Structure templates are used only once either by its parent template or View. The call graph of the templates are equal to the structure of the forms, the Form Template uses the Tab Template, the Tab Template uses one or more Group Templates, the Group Template uses one or more widget templates and it can use additionally one or more Singlerow Templates, which also uses one ore more widget templates.

 

 

Widget Templates

Based on a text field type attribute it has an own default template. It is possible to load a custom template for the widget by editing the template attribute of the text field. A Widget Template is always strongly typed on the Workflow-Server (see .Net API Reference - FormField Class and on the Workflow-Client (see JavaScript API - FieldModels). It never uses a Structure Template and defines only the represantaion of the Workflow-Server Model and the data-bindings (seeKnockout.js Binding-Syntax and R.Niemeyer Knockout-Kendo) between Html-Markup and Workflow-Client Model.

Views_and_Temlates_Widget_Templates.jpg

 

Controls and Contents

The JavaScript API, the Workflow Theme and additional JavaScript - Files (.js) and CascadingStyleSheets (.css) are getting loaded in partial views which we prefix with "Script" or "Style" and postfix with "Control", for example ScriptFormControl contains all JavaScript - Files which is necessary for the Form View.Views_and_Templates_Controls_and_Contents.jpg

 

Script Controls

A Script Control is a partial view which is getting loaded by and . It renders the ASP.NET MVC ScriptBundles (see MVC Bundling and Minification).

 

Overview
Contributors